From: Andy Spencer Date: Sat, 27 Apr 2013 02:41:33 +0000 (+0000) Subject: Make parallel build work again X-Git-Url: http://pileus.org/git/?p=~andy%2Fspades;a=commitdiff_plain;h=c51ceae68e5d3aa84e262a0dbdd054a5fab64945 Make parallel build work again We just use the R.class file to denote all the class files, since we build them all with the same command. This prevents make from trying to compile all the class files separately. --- diff --git a/makefile b/makefile index 4491afd..6fcf87a 100644 --- a/makefile +++ b/makefile @@ -8,15 +8,12 @@ KEYTYPE ?= pkcs12 KEYNAME ?= android ANDROID ?= /opt/android-sdk-update-manager/platforms/android-10/android.jar -# Sources -RES := $(shell find res -type f) -SRC := $(shell find src -name '*.java') - -# Objects -GEN := gen/$(subst .,/,$(PACKAGE))/R.java -OBJ := $(subst .java,.class, \ - $(SRC:src/%=obj/%) \ - $(GEN:gen/%=obj/%)) +# Variables +DIR := $(subst .,/,$(PACKAGE)) +RES := $(wildcard res/*/*.*) +SRC := $(wildcard src/$(DIR)/*.java) +GEN := gen/$(DIR)/R.java +OBJ := obj/$(DIR)/R.class # Targets debug: bin/$(PROGRAM).dbg @@ -127,6 +124,5 @@ $(GEN): AndroidManifest.xml $(RES) | gen bin gen obj: @mkdir -p $@ -# Use parallel javac instead -.PRECIOUS: %.dex %.res -.NOTPARALLEL: +# Keep intermediate files +.SECONDARY: