Move API files shared between Mac and iOS to the Cocoa directory
[WebKit-https.git] / Makefile.shared
index 718439a..ee723d8 100644 (file)
@@ -1,16 +1,41 @@
-XCODE_OPTIONS = `perl -I../WebKitTools/Scripts -Mwebkitdirs -e 'print XcodeOptionString()'`
-XCODE_OPTIONS_NO_CONFIG = `perl -I../WebKitTools/Scripts -Mwebkitdirs -e 'print XcodeOptionStringNoConfig()'`
+SCRIPTS_PATH ?= ../Tools/Scripts
+
+XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()' -- $(BUILD_WEBKIT_OPTIONS)` $(ARGS)
+
+ifneq (,$(SDKROOT))
+       XCODE_OPTIONS += SDKROOT=$(SDKROOT)
+endif
+
+ifneq (,$(ARCHS))
+       XCODE_OPTIONS += ARCHS="$(ARCHS)"
+       XCODE_OPTIONS += ONLY_ACTIVE_ARCH=NO
+endif
+
+DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default")
+VERBOSITY ?= $(DEFAULT_VERBOSITY)
+
+ifeq ($(VERBOSITY),default)
+OUTPUT_FILTER = grep -v setenv
+else
+ifeq ($(VERBOSITY),noisy)
+OUTPUT_FILTER = cat
+else
+OUTPUT_FILTER = $(SCRIPTS_PATH)/filter-build-webkit
+endif
+endif
 
 all:
-       xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS)
+       ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
-debug d development dev develop:
-       ../WebKitTools/Scripts/set-webkit-configuration --development
-       xcodebuild $(OTHER_OPTIONS) -configuration Development $(XCODE_OPTIONS_NO_CONFIG)
+debug d development dev develop: force
+       $(SCRIPTS_PATH)/set-webkit-configuration --debug
+       ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
-release r deployment dep deploy:
-       ../WebKitTools/Scripts/set-webkit-configuration --deployment
-       xcodebuild $(OTHER_OPTIONS) -configuration Deployment $(XCODE_OPTIONS_NO_CONFIG)
+release r deployment dep deploy: force
+       $(SCRIPTS_PATH)/set-webkit-configuration --release
+       ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
 clean:
-       xcodebuild -alltargets clean $(XCODE_OPTIONS)
+       ( xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
+
+force: ;