Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix Makefile
Browse files Browse the repository at this point in the history
Make running 'pod install' a separate 'hidden' target depended on by the targets that actually build.
Remove xcpretty support as it hides errors that make debugging errors hard (like missing development team).

Fixes #4
  • Loading branch information
russellhancox committed Oct 9, 2017
1 parent f494505 commit f466ad5
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
ifeq (,$(wildcard Pods))
$(warning Pods dir does not exist, running 'pod install')
@pod install
endif

XCPRETTY_AVAIL:=$(shell command -v xcpretty 2>/dev/null)
ifdef XCPRETTY_AVAIL
XCPRETTY:=| ${XCPRETTY_AVAIL} -sc
endif

ifeq (,${BUILD_D})
DERIVED_DATA=$(shell xcodebuild -workspace Restor.xcworkspace -scheme Restor -showBuildSettings | grep TARGET_BUILD_DIR | head -n1 | awk '{print $$3}')
else
Expand All @@ -24,38 +14,42 @@ list:
sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | \
xargs

debug:
.PHONY: .prebuild
.prebuild:
ifeq (,$(wildcard Pods))
@echo "Pods dir does not exist, running 'pod install'"
@pod install
endif

debug: .prebuild
@xcodebuild \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Debug \
build \
${XCPRETTY}
build

release:
release: .prebuild
@xcodebuild \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Release \
build \
${XCPRETTY}
build

google_release:
google_release: .prebuild
@xcodebuild \
TEAM_ID=EQHXZ8M8AV \
-derivedDataPath ${DERIVED_DATA} \
-parallelizeTargets -jobs ${NCPUS} \
-workspace Restor.xcworkspace \
-scheme Restor \
-configuration Release \
build \
${XCPRETTY}
build

clean:
@xcodebuild -workspace Restor.xcworkspace -scheme Restor clean ${XCPRETTY}
@rm -rf build
@xcodebuild -workspace Restor.xcworkspace -scheme Restor clean
@rm -rf ${DERIVED_DATA}

0 comments on commit f466ad5

Please sign in to comment.