summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-20 17:21:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-20 17:40:52 +0100
commitdea0398ee24eb278cdb14999efbf34d634454eaa (patch)
tree58b0634d262455f1e11f1d32d1081a4d3eb3ac85 /odk
parent85f1c4a2cb1b54aabcb5249cf3c0b07182e8c434 (diff)
SDK settings.mk: Don't guess PLATFORM/PROCTYPE
...rather, pass them from the build to the SDK installation via dk.mk. (The SDK installation is already platform-specific anyway, see the binary executables in its bin/ directory, so there is no point in not fixing this at build time. In the future, the shipped settings.mk could of course be stripped to just the parts relevant for a given platform, of course.) Along the way, fixes some apparent "ppc" vs. "powerpc" typos in settings.mk. This is a prerequisite to create a working settings.mk for macosx_x86_64, but does not yet do that. Change-Id: Ib8e0c03ad6dfd610aae58a61e32bdc61c785584f
Diffstat (limited to 'odk')
-rw-r--r--odk/CustomTarget_settings.mk3
-rw-r--r--odk/settings/dk.mk2
-rw-r--r--odk/settings/settings.mk38
3 files changed, 12 insertions, 31 deletions
diff --git a/odk/CustomTarget_settings.mk b/odk/CustomTarget_settings.mk
index 2a0d6e402a7c..fe3b1e4c73dc 100644
--- a/odk/CustomTarget_settings.mk
+++ b/odk/CustomTarget_settings.mk
@@ -13,7 +13,8 @@ $(eval $(call gb_CustomTarget_register_target,odk/settings,dk.mk))
$(call gb_CustomTarget_get_workdir,odk/settings)/dk.mk : $(SRCDIR)/odk/settings/dk.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,SED,1)
- tr -d "\015" < $< | sed -e 's/@@RELEASE@@/$(PRODUCTVERSION)/' \
+ tr -d "\015" < $< | sed -e 's/@@PLATFORMID@@/$(PLATFORMID)/' \
+ -e 's/@@RELEASE@@/$(PRODUCTVERSION)/' \
-e 's/@@BUILDID@@/$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)/' \
-e 's/@@ENABLE_DBGUTIL@@/$(ENABLE_DBGUTIL)/' > $@
diff --git a/odk/settings/dk.mk b/odk/settings/dk.mk
index 387ef1394f85..f89032106d64 100644
--- a/odk/settings/dk.mk
+++ b/odk/settings/dk.mk
@@ -1,4 +1,4 @@
-# OpenOffice.org @@RELEASE@@ SDK dependent settings
+PLATFORMID=@@PLATFORMID@@
SDKVERSION=@@RELEASE@@
BUILDID=@@BUILDID@@
LIBO_SDK_ENABLE_DBGUTIL=@@ENABLE_DBGUTIL@@
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index 0e2895a037a2..9bc42f53c889 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -22,12 +22,8 @@
include $(OO_SDK_HOME)/settings/dk.mk
# test for the platform
-PLATFORM := $(shell $(PRJ)/config.guess | cut -d"-" -f3,4)
-
-# config.guess is missing for windows. We rely on getting "" in this case.
-ifeq "$(PLATFORM)" ""
-PLATFORM = windows
-endif
+PLATFORM := $(shell printf '%s' $(PLATFORMID) | cut -f 1 -d _)
+PROCTYPE := $(shell printf '%s' $(PLATFORMID) | cut -f 2- -d _)
# debug option, default is no debug
DEBUG=no
@@ -153,11 +149,9 @@ endif
# Solaris specific settings
#
###########################################################################
-ifneq (,$(findstring solaris,$(PLATFORM)))
+ifeq "$(PLATFORM)" "solaris"
# Settings for Solaris using GCC
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)$(shell /usr/ccs/bin/elfdump -e "$(OO_SDK_URE_HOME)/lib/libuno_sal.so.3" | /usr/xpg4/bin/grep -q -w ELFCLASS64 && echo 64)
-
ifeq "$(PROCTYPE)" "sparc"
PLATFORM=solsparc
UNOPKG_PLATFORM=Solaris_SPARC
@@ -258,17 +252,13 @@ endif
# Linux specific settings
#
###########################################################################
-ifneq (,$(findstring linux,$(PLATFORM)))
+ifeq "$(PLATFORM)" "linux"
# Settings for Linux using gcc compiler
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/')
-PLATFORM=linux
-
UNOPKG_PLATFORM=Linux_$(PROCTYPE)
JAVA_PROC_TYPE=$(PROCTYPE)
-ifeq "$(PROCTYPE)" "i386"
-UNOPKG_PLATFORM=Linux_x86
+ifeq "$(PROCTYPE)" "x86"
JAVA_PROC_TYPE=i386
endif
@@ -279,7 +269,6 @@ endif
ifeq "$(PROCTYPE)" "sparc"
UNOPKG_PLATFORM=Linux_SPARC
-JAVA_PROC_TYPE=sparc
endif
ifeq "$(PROCTYPE)" "x86_64"
@@ -340,7 +329,7 @@ endif
CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
-ifeq "$(PROCTYPE)" "ppc"
+ifeq "$(PROCTYPE)" "powerpc"
CC_FLAGS+=-fPIC
endif
@@ -355,7 +344,7 @@ LIBO_SDK_LDFLAGS_STDLIBS =
LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
-ifeq "$(PROCTYPE)" "ppc"
+ifeq "$(PROCTYPE)" "powerpc"
LIBRARY_LINK_FLAGS+=-fPIC
endif
COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
@@ -375,21 +364,14 @@ endif
# MacOSX/Darwin specific settings
#
###########################################################################
-ifneq (,$(findstring darwin,$(PLATFORM)))
+ifeq "$(PLATFORM)" "macosx"
# Settings for MacOSX using gcc 4.0.1 compiler
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
-
-# Default is MacOSX on a Intel machine
-PLATFORM=macosx
-
-ifeq "$(PROCTYPE)" "i386"
+ifeq "$(PROCTYPE)" "x86"
UNOPKG_PLATFORM=MacOSX_x86
-JAVA_PROC_TYPE=x86
else
ifeq "$(PROCTYPE)" "x86_64"
UNOPKG_PLATFORM=MacOSX_x86
-JAVA_PROC_TYPE=x86
endif
endif
JAVABIN=Commands
@@ -483,8 +465,6 @@ endif
ifneq (,$(findstring freebsd,$(PLATFORM)))
# Settings for FreeBSD using gcc compiler
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
-
ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
PLATFORM=kfreebsd
ifeq "$(PROCTYPE)" "x86_64"