[Libreoffice-commits] core.git: odk/CustomTarget_settings.mk odk/settings

Stephan Bergmann sbergman at redhat.com
Thu Jan 30 08:14:42 PST 2014


 odk/CustomTarget_settings.mk |    4 +++-
 odk/settings/dk.mk           |    3 ++-
 odk/settings/settings.mk     |    4 ----
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit b3db695a338f1acddbe46102138a0167fc346f58
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 30 17:12:40 2014 +0100

    SDK: Split PLATFORMID at build time rather than runtime
    
    ...where $(shell printf ...) in settings.mk likely doesn't work on Windows.
    
    Change-Id: I64a51203d1bf131160768f9a9069f428228aa6b1

diff --git a/odk/CustomTarget_settings.mk b/odk/CustomTarget_settings.mk
index fe3b1e4..c48a734 100644
--- a/odk/CustomTarget_settings.mk
+++ b/odk/CustomTarget_settings.mk
@@ -13,7 +13,9 @@ $(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/@@PLATFORMID@@/$(PLATFORMID)/' \
+	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 f890321..8f41b7e1 100644
--- a/odk/settings/dk.mk
+++ b/odk/settings/dk.mk
@@ -1,4 +1,5 @@
-PLATFORMID=@@PLATFORMID@@
+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 1153746..740233e 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -21,10 +21,6 @@
 
 include $(OO_SDK_HOME)/settings/dk.mk
 
-# test for the platform
-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
 ifeq "$(MAKECMDGOALS)" "debug"


More information about the Libreoffice-commits mailing list