ios/CustomTarget_Lo_Xcconfig.mk           |   34 ++++++++++++++++++++++++++++++
 ios/CustomTarget_MobileLibreOffice_app.mk |   14 +-----------
 ios/Module_ios.mk                         |    1 
 3 files changed, 37 insertions(+), 12 deletions(-)

New commits:
commit 4dd32d6b2e265611d57c0b16e4b67ced3c64bce4
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Dec 16 17:45:52 2013 +0200

    Split out the setup of lo.xcconfig into a separate CustomTarget
    
    Change-Id: If486cf470583205763722766da57303de904b321

diff --git a/ios/CustomTarget_Lo_Xcconfig.mk b/ios/CustomTarget_Lo_Xcconfig.mk
new file mode 100644
index 0000000..b6032da
--- /dev/null
+++ b/ios/CustomTarget_Lo_Xcconfig.mk
@@ -0,0 +1,34 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_CustomTarget_CustomTarget,ios/Lo_Xcconfig))
+
+LO_XCCONFIG = $(BUILDDIR)/ios/lo.xcconfig
+
+$(call gb_CustomTarget_get_target,ios/Lo_Xcconfig): $(LO_XCCONFIG)
+
+.PHONY : $(LO_XCCONFIG)
+
+$(LO_XCCONFIG) :
+    # Edit in the list of all our (static) libs in the Xcode
+    # configuration file.
+       all_libs=`$(SRCDIR)/bin/lo-all-static-libs`; \
+       sed -e "s|^\(LINK_LDFLAGS =\).*$$|\1 $$all_libs|" < $(LO_XCCONFIG) > 
$(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)
+
+    # When SRCDIR!=BUILDDIR, Xcode is used on the project in the
+    # *source* tree (because that is where the source files are). Copy
+    # the configuration file to the corresponding source dir so that
+    # Xcode can find it.
+       if test $(SRCDIR) != $(BUILDDIR); then \
+               cp $(LO_XCCONFIG) $(SRCDIR)/ios; \
+       fi
+
+# Do *not* remove $(LO_XCCONFIG) in a clean target. It is created
+# during configury, not in this custom gbuild makefile.
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/CustomTarget_MobileLibreOffice_app.mk 
b/ios/CustomTarget_MobileLibreOffice_app.mk
index 122b067..262cf9d 100644
--- a/ios/CustomTarget_MobileLibreOffice_app.mk
+++ b/ios/CustomTarget_MobileLibreOffice_app.mk
@@ -8,7 +8,6 @@
 
 #- Env ------------------------------------------------------------------------
 
-LO_XCCONFIG    := lo.xcconfig
 DEST_RESOURCE  := MobileLibreOffice/resource_link
 BUILDID                        :=$(shell cd $(SRCDIR) && git log -1 
--format=%H)
 
@@ -30,7 +29,8 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,ios/MobileLibreOffice))
 
 #==============================================================================
 # Build
-$(call gb_CustomTarget_get_target,ios/MobileLibreOffice): 
MobileLibreOffice_setup
+# Depend on the custom target that sets up lo.xcconfig
+$(call gb_CustomTarget_get_target,ios/MobileLibreOffice): $(call 
gb_CustomTarget_get_target,ios/Lo_Xcconfig) MobileLibreOffice_setup
 #==============================================================================
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
        $(call MobileLibreOfficeXcodeBuild, clean build)
@@ -41,16 +41,6 @@ MobileLibreOffice_setup:
 #==============================================================================
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
 
-       # Libs #
-       # Create the link flags in the xcconfig for Xcode linkage
-       all_libs=`$(SRCDIR)/bin/lo-all-static-libs`; \
-       sed -e "s|^\(LINK_LDFLAGS =\).*$$|\1 $$all_libs|" < 
$(BUILDDIR)/ios/$(LO_XCCONFIG) > $(BUILDDIR)/ios/$(LO_XCCONFIG).new && mv 
$(BUILDDIR)/ios/$(LO_XCCONFIG).new $(BUILDDIR)/ios/$(LO_XCCONFIG)
-
-       # Copy lo.xcconfig to source dir for the Xcode projects
-       if test $(SRCDIR) != $(BUILDDIR); then \
-               cp $(BUILDDIR)/ios/$(LO_XCCONFIG) $(SRCDIR)/ios; \
-       fi
-
        # Resources #
        rm -rf $(DEST_RESOURCE) 2>/dev/null
        mkdir -p $(DEST_RESOURCE)
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
index 671e9f3..caf3220 100644
--- a/ios/Module_ios.mk
+++ b/ios/Module_ios.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,ios))
 ifeq ($(OS),IOS)
 
 $(eval $(call gb_Module_add_targets,ios,\
+       CustomTarget_Lo_Xcconfig \
        Executable_LibreOffice \
        CustomTarget_LibreOffice_app \
        CustomTarget_MobileLibreOffice_app \
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to