[Libreoffice-commits] core.git: ios/CustomTarget_iOS.mk ios/LibreOfficeKit ios/loApp.xcconfig.in ios/loKit.xcconfig.in
jan Iversen
jani at libreoffice.org
Tue Oct 3 12:17:12 UTC 2017
ios/CustomTarget_iOS.mk | 64 +++++-------
ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj | 20 ++-
ios/loApp.xcconfig.in | 17 +++
ios/loKit.xcconfig.in | 18 +++
4 files changed, 73 insertions(+), 46 deletions(-)
New commits:
commit 9bda1ac60f3e92b7023275daf15a31efc08daaf7
Author: jan Iversen <jani at libreoffice.org>
Date: Tue Oct 3 09:41:48 2017 +0200
iOS, change generation of xcconfig
The generation was far to complex simplified.
Change-Id: Iea2f1b9630f70f05deeb8eb44aa8333989929642
diff --git a/ios/CustomTarget_iOS.mk b/ios/CustomTarget_iOS.mk
index c6a7cad37a0a..a05194b7d318 100644
--- a/ios/CustomTarget_iOS.mk
+++ b/ios/CustomTarget_iOS.mk
@@ -8,8 +8,8 @@
#- Env ------------------------------------------------------------------------
IOSGEN := $(SRCDIR)/ios/generated
IOSRES := $(IOSGEN)/resources
-IOSKITXC := $(BUILDDIR)/ios/loKit.xcconfig
-IOSAPPXC := $(BUILDDIR)/ios/loApp.xcconfig
+IOSKITXC := $(WORKDIR)/ios/loKit.xcconfig
+IOSAPPXC := $(WORKDIR)/ios/loApp.xcconfig
IOSKITPRJ := $(SRCDIR)/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj
IOSAPPPRJ := $(SRCDIR)/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj
IOSAPP := $(INSTDIR)/LibreOfficeLight.app
@@ -27,36 +27,29 @@ $(call gb_CustomTarget_get_target,ios/ios): $(IOSGEN)/$(IOSKIT)
#- Generate xcconfig files ---------------------------------------------------
-$(IOSKITXC) : $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS.mk
+$(IOSKITXC) $(IOSAPPXC): $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
- @echo "// Xcode configuration properties" > $(IOSKITXC)
- @echo "LO_BUILDDIR = $(BUILDDIR)" >> $(IOSKITXC)
- @echo "LO_INSTDIR = $(INSTDIR)" >> $(IOSKITXC)
- @echo "LO_SRCDIR = $(SRC_ROOT)" >> $(IOSKITXC)
- @echo "LO_WORKDIR = $(WORKDIR)" >> $(IOSKITXC)
- @echo "OTHER_CFLAGS = $(gb_GLOBALDEFS)" >> $(IOSKITXC)
- @echo "OTHER_CPLUSPLUSFLAGS = $(gb_GLOBALDEFS)" >> $(IOSKITXC)
- @echo "PRELINK_LIBS = `$(SRCDIR)/bin/lo-all-static-libs`" >> $(IOSKITXC)
- @echo "LINK_LDFLAGS = -Wl,-lz,-liconv,-map,$(WORKDIR)/iosKit.map " >> $(IOSKITXC)
- @echo "SYMROOT = $(WORKDIR)/ios/build\n" >> $(IOSKITXC)
-
-$(IOSAPPXC) : $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS.mk
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
- @mkdir -p $(IOSGEN);
- @echo "// Xcode configuration properties" > $(IOSAPPXC)
- @echo "LO_BUILDDIR = $(BUILDDIR)" >> $(IOSAPPXC)
- @echo "LO_INSTDIR = $(INSTDIR)" >> $(IOSAPPXC)
- @echo "LO_SRCDIR = $(SRC_ROOT)" >> $(IOSAPPXC)
- @echo "LO_WORKDIR = $(WORKDIR)" >> $(IOSAPPXC)
- @echo "OTHER_CFLAGS = $(gb_GLOBALDEFS)" >> $(IOSAPPXC)
- @echo "OTHER_CPLUSPLUSFLAGS = $(gb_GLOBALDEFS)" >> $(IOSAPPXC)
- @echo "LINK_LDFLAGS = -Wl,-lz,-liconv,-map,$(WORKDIR)/iosApp.map " >> $(IOSAPPXC)
- @echo "SYMROOT = $(WORKDIR)/ios/build\n" >> $(IOSAPPXC)
-
-
-#- Generate ios ------------------------------------------------------------
-.PHONY : iosCopySetup
-iosCopySetup: $(IOSKITXC) $(IOSAPPXC)
+ @mkdir -p $(IOSGEN) $(WORKDIR)/ios;
+ sed -e "s'@BUILDDIR@'$(BUILDDIR)'g" \
+ -e "s'@INSTDIR@'$(INSTDIR)'g" \
+ -e "s'@SRCDIR@'$(SRC_ROOT)'g" \
+ -e "s'@WORKDIR@'$(WORKDIR)'g" \
+ -e "s'@CFLAGS@'$(gb_GLOBALDEFS)'g" \
+ -e "s'@CPLUSPLUSFLAGS@'$(gb_GLOBALDEFS)'g" \
+ -e "s'@LDFLAGS@'-Wl,-lz,-liconv,-map,$(WORKDIR)/ios/iosKit.map 'g" \
+ -e "s'@SYMROOT@'$(WORKDIR)/ios/build'g" \
+ -e "s'@PRELINK@'`$(SRCDIR)/bin/lo-all-static-libs`'g" \
+ $(SRCDIR)/ios/loKit.xcconfig.in > $(WORKDIR)/ios/loKit.xcconfig
+ sed -e "s'@BUILDDIR@'$(BUILDDIR)'g" \
+ -e "s'@INSTDIR@'$(INSTDIR)'g" \
+ -e "s'@SRCDIR@'$(SRC_ROOT)'g" \
+ -e "s'@WORKDIR@'$(WORKDIR)'g" \
+ -e "s'@CFLAGS@'$(gb_GLOBALDEFS)'g" \
+ -e "s'@CPLUSPLUSFLAGS@'$(gb_GLOBALDEFS)'g" \
+ -e "s'@LDFLAGS@'-Wl,-lz,-liconv,-map,$(WORKDIR)/ios/iosKit.map 'g" \
+ -e "s'@SYMROOT@'$(WORKDIR)/ios/build'g" \
+ $(SRCDIR)/ios/loApp.xcconfig.in > $(WORKDIR)/ios/loApp.xcconfig
+
ifeq ("$(wildcard $(IOSRES))","")
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
@@ -116,9 +109,8 @@ endif
#- build ---------------------------------------------------------------------
-$(IOSGEN)/$(IOSKIT): $(IOSKITPRJ)/project.pbxproj iosCopySetup
+$(IOSGEN)/$(IOSKIT): $(IOSKITPRJ)/project.pbxproj $(IOSKITXC) $(IOSAPPXC)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
- mkdir -p $(WORKDIR)/ios
CC=; \
$(call gb_Helper_print_on_error, \
xcodebuild \
@@ -137,7 +129,6 @@ $(IOSGEN)/$(IOSKIT): $(IOSKITPRJ)/project.pbxproj iosCopySetup
$(INSTDIR)/$(IOSAPP): $(IOSAPPPRJ)/project.pbxproj $(IOSGEN)/$(IOSKIT)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
- mkdir -p $(WORKDIR)/ios
CC=; \
$(call gb_Helper_print_on_error, \
xcodebuild \
@@ -155,13 +146,12 @@ $(INSTDIR)/$(IOSAPP): $(IOSAPPPRJ)/project.pbxproj $(IOSGEN)/$(IOSKIT)
#- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/ios):
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2)
- rm -rf $(IOSGEN) $(IOSKITXC) $(IOSAPPXC)
+ rm -rf $(IOSGEN)
rm -rf $(SRCDIR)/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.xcworkspace
rm -rf $(SRCDIR)/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/xcuserdata
rm -rf $(SRCDIR)/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.xcworkspace
rm -rf $(SRCDIR)/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/xcuserdata
- rm -rf $(SRCDIR)/ios/LibreOfficeLight/build
- rm -rf $(SRCDIR)/ios/LibreOfficeKit/build
+ rm -rf $(WORKDIR)/ios
# vim: set noet sw=4 ts=4:
diff --git a/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj b/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
index fe610f22939b..918920baeee5 100644
--- a/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
@@ -25,7 +25,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = loKit.xcconfig; path = /Users/jani/lo_ios/ios/loKit.xcconfig; sourceTree = "<group>"; };
+ 3908315E1F8395EB003F2A29 /* loKit.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = loKit.xcconfig; path = ../../../../../../../Users/jani/lo_ios/workdir/ios/loKit.xcconfig; sourceTree = "<group>"; };
39B5D2151F78130F008FB162 /* libLibreOfficeKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libLibreOfficeKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
39B5D2181F78130F008FB162 /* LibreOfficeKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LibreOfficeKit.h; sourceTree = "<group>"; };
39B5D2191F78130F008FB162 /* LibreOfficeKit.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LibreOfficeKit.mm; sourceTree = "<group>"; };
@@ -69,7 +69,7 @@
39B5D2171F78130F008FB162 /* LibreOfficeKit */ = {
isa = PBXGroup;
children = (
- 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */,
+ 3908315E1F8395EB003F2A29 /* loKit.xcconfig */,
39B5D2181F78130F008FB162 /* LibreOfficeKit.h */,
39B5D2191F78130F008FB162 /* LibreOfficeKit.mm */,
);
@@ -142,10 +142,12 @@
/* Begin XCBuildConfiguration section */
39B5D21C1F78130F008FB162 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD)";
+ ARCHS = (
+ x86_64,
+ arm64,
+ );
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -203,16 +205,18 @@
"-lstdc++",
);
SDKROOT = iphoneos;
- VALID_ARCHS = "arm64 x86_64";
+ VALID_ARCHS = "x86_64 arm64";
};
name = Debug;
};
39B5D21D1F78130F008FB162 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD)";
+ ARCHS = (
+ x86_64,
+ arm64,
+ );
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -271,7 +275,6 @@
};
39B5D21F1F78130F008FB162 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -281,7 +284,6 @@
};
39B5D2201F78130F008FB162 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 39AB2EC91F7D6D3D00E6FDA9 /* loKit.xcconfig */;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/ios/loApp.xcconfig.in b/ios/loApp.xcconfig.in
new file mode 100644
index 000000000000..c7fae301374c
--- /dev/null
+++ b/ios/loApp.xcconfig.in
@@ -0,0 +1,17 @@
+//
+// 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/.
+//
+// Xcode configuration properties
+LO_BUILDDIR = @BUILDDIR@
+LO_INSTDIR = @INSTDIR@
+LO_SRCDIR = @SRCDIR@
+LO_WORKDIR = @WORKDIR@
+OTHER_CFLAGS = @CFLAGS@
+OTHER_CPLUSPLUSFLAGS = @CPLUSPLUSFLAGS@
+LINK_LDFLAGS = @LDFLAGS@
+SYMROOT = @SYMROOT@
+
diff --git a/ios/loKit.xcconfig.in b/ios/loKit.xcconfig.in
new file mode 100644
index 000000000000..8b1e62f230db
--- /dev/null
+++ b/ios/loKit.xcconfig.in
@@ -0,0 +1,18 @@
+//
+// 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/.
+//
+// Xcode configuration properties
+LO_BUILDDIR = @BUILDDIR@
+LO_INSTDIR = @INSTDIR@
+LO_SRCDIR = @SRCDIR@
+LO_WORKDIR = @WORKDIR@
+OTHER_CFLAGS = @CFLAGS@
+OTHER_CPLUSPLUSFLAGS = @CPLUSPLUSFLAGS@
+LINK_LDFLAGS = @LDFLAGS@
+SYMROOT = @SYMROOT@
+
+PRELINK_LIBS = @PRELINK@
More information about the Libreoffice-commits
mailing list