[GTK] generate-gtkdoc should use argparse
[WebKit-https.git] / Makefile.shared
1 SCRIPTS_PATH ?= ../Tools/Scripts
2
3 SET_COLOR_DIAGNOSTICS_ARG = if [[ -t 1 ]]; then COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; fi
4 XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()' -- $(BUILD_WEBKIT_OPTIONS)` $${COLOR_DIAGNOSTICS_ARG} $(ARGS)
5
6 ifneq (,$(SDKROOT))
7         XCODE_OPTIONS += SDKROOT=$(SDKROOT)
8 endif
9
10 ifneq (,$(ARCHS))
11         XCODE_OPTIONS += ARCHS="$(ARCHS)"
12         XCODE_OPTIONS += ONLY_ACTIVE_ARCH=NO
13 endif
14
15 DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default")
16 VERBOSITY ?= $(DEFAULT_VERBOSITY)
17
18 ifeq ($(VERBOSITY),default)
19 OUTPUT_FILTER = grep -v setenv
20 else
21 ifeq ($(VERBOSITY),noisy)
22 OUTPUT_FILTER = cat
23 else
24 OUTPUT_FILTER = $(SCRIPTS_PATH)/filter-build-webkit
25 endif
26 endif
27
28 all:
29         ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
30
31 debug d development dev develop: force
32         $(SCRIPTS_PATH)/set-webkit-configuration --debug
33         ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
34
35 release r deployment dep deploy: force
36         $(SCRIPTS_PATH)/set-webkit-configuration --release
37         ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
38
39 clean:
40         ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
41
42 force: ;