summaryrefslogtreecommitdiff
path: root/ios/CustomTarget_Lo_Xcconfig.mk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-12-16 17:45:52 +0200
committerTor Lillqvist <tml@collabora.com>2013-12-16 17:49:41 +0200
commit4dd32d6b2e265611d57c0b16e4b67ced3c64bce4 (patch)
tree6bd5a62d3e13a6585ff12f45803f1bdd7ee5d595 /ios/CustomTarget_Lo_Xcconfig.mk
parent6ae7d7734d7cba05db12a087c7fa13abbb2c0797 (diff)
Split out the setup of lo.xcconfig into a separate CustomTarget
Change-Id: If486cf470583205763722766da57303de904b321
Diffstat (limited to 'ios/CustomTarget_Lo_Xcconfig.mk')
-rw-r--r--ios/CustomTarget_Lo_Xcconfig.mk34
1 files changed, 34 insertions, 0 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: