[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - odk/CustomTarget_settings.mk odk/settings
Stephan Bergmann
sbergman at redhat.com
Fri Jan 31 02:59:23 PST 2014
odk/CustomTarget_settings.mk | 5 +++-
odk/settings/dk.mk | 3 +-
odk/settings/settings.mk | 48 ++++++++++++++-----------------------------
3 files changed, 22 insertions(+), 34 deletions(-)
New commits:
commit 54eb449459db74634695c1a986e973f97adc6ab6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 20 17:21:14 2014 +0100
SDK settings.mk: Don't guess PLATFORM/PROCTYPE, and fix Mac OS X 64 bit
...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.
Cherry picked from commit dea0398ee24eb278cdb14999efbf34d634454eaa "SDK
settings.mk: Don't guess PLATFORM/PROCTYPE" plus
e5ad31e2f784856506c28092166dc8704c84e868 "Fix Mac OS X 64 bit SDK settings.mk"
and b3db695a338f1acddbe46102138a0167fc346f58 "SDK: Split PLATFORMID at build
time rather than runtime" fix.
Conflicts:
odk/settings/settings.mk
Change-Id: Ib8e0c03ad6dfd610aae58a61e32bdc61c785584f
Reviewed-on: https://gerrit.libreoffice.org/7748
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/odk/CustomTarget_settings.mk b/odk/CustomTarget_settings.mk
index 2a0d6e4..c48a734 100644
--- a/odk/CustomTarget_settings.mk
+++ b/odk/CustomTarget_settings.mk
@@ -13,7 +13,10 @@ $(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/@@PLATFORM@@/$(firstword $(subst _, ,$(PLATFORMID)))/' \
+ -e 's/@@PROCTYPE@@/$(subst $(WHITESPACE),_,$(wordlist 2,$(words $(subst _, ,$(PLATFORMID))),$(subst _, ,$(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 387ef13..8f41b7e1 100644
--- a/odk/settings/dk.mk
+++ b/odk/settings/dk.mk
@@ -1,4 +1,5 @@
-# OpenOffice.org @@RELEASE@@ SDK dependent settings
+PLATFORM=@@PLATFORM@@
+PROCTYPE=@@PROCTYPE@@
SDKVERSION=@@RELEASE@@
BUILDID=@@BUILDID@@
LIBO_SDK_ENABLE_DBGUTIL=@@ENABLE_DBGUTIL@@
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index b884e75..0d14ad4 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -21,14 +21,6 @@
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
-
# debug option, default is no debug
DEBUG=no
ifeq "$(MAKECMDGOALS)" "debug"
@@ -153,11 +145,9 @@ endif
# Solaris specific settings
#
###########################################################################
-ifneq (,$(findstring solaris,$(PLATFORM)))
+ifeq "$(PLATFORM)" "solaris"
# Settings for Solaris using Sun Workshop compiler
-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
@@ -269,17 +259,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
@@ -290,7 +276,6 @@ endif
ifeq "$(PROCTYPE)" "sparc"
UNOPKG_PLATFORM=Linux_SPARC
-JAVA_PROC_TYPE=sparc
endif
ifeq "$(PROCTYPE)" "x86_64"
@@ -351,7 +336,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
@@ -366,7 +351,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)
@@ -386,36 +371,37 @@ 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
+UNOPKG_PLATFORM=MacOSX_x86_64
endif
endif
JAVABIN=Commands
+ifeq "$(PROCTYPE)" "x86"
GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2)
ifeq "$(GCC_VERSION)" "4.2"
GCC_ARCH_OPTION=-arch i386
endif
+endif
OS=MACOSX
PS=/
ICL=\$$
+ifeq "$(PROCTYPE)" "x86"
CC=gcc-$(GCC_VERSION)
LINK=g++-$(GCC_VERSION)
LIB=g++-$(GCC_VERSION)
+else
+CC=clang++
+LINK=clang++
+LIB=clang++
+endif
ECHO=@echo
MKDIR=mkdir -p
CAT=cat
@@ -494,8 +480,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"
More information about the Libreoffice-commits
mailing list