diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-12-16 17:45:52 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-12-16 17:49:41 +0200 |
commit | 4dd32d6b2e265611d57c0b16e4b67ced3c64bce4 (patch) | |
tree | 6bd5a62d3e13a6585ff12f45803f1bdd7ee5d595 /ios | |
parent | 6ae7d7734d7cba05db12a087c7fa13abbb2c0797 (diff) |
Split out the setup of lo.xcconfig into a separate CustomTarget
Change-Id: If486cf470583205763722766da57303de904b321
Diffstat (limited to 'ios')
-rw-r--r-- | ios/CustomTarget_Lo_Xcconfig.mk | 34 | ||||
-rw-r--r-- | ios/CustomTarget_MobileLibreOffice_app.mk | 14 | ||||
-rw-r--r-- | ios/Module_ios.mk | 1 |
3 files changed, 37 insertions, 12 deletions
diff --git a/ios/CustomTarget_Lo_Xcconfig.mk b/ios/CustomTarget_Lo_Xcconfig.mk new file mode 100644 index 000000000000..b6032dacc8a3 --- /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 122b06778b06..262cf9deb11b 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 671e9f32a67b..caf3220d9909 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 \ |