Extend make clean for android zu also cleanup the compiled java classes and apks (and everything else generated during build process).
This also seems to fix a problem with make apk on some machines. Thanks to Dustin Skoracki for helping to investigate. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28062 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5028eaa025
commit
a994401294
2 changed files with 16 additions and 10 deletions
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
.SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this
|
.SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this
|
||||||
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
|
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
|
||||||
|
.PHONY: apk classes clean dex dirs libs
|
||||||
|
|
||||||
$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
|
$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
|
||||||
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS)
|
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS)
|
||||||
|
@ -42,7 +42,9 @@ JAVA_OBJ := $(call java2class,$(subst /src/,/bin/,$(JAVA_SRC)))
|
||||||
LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
|
LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
|
||||||
TEMP_APK := $(BUILDDIR)/bin/_Rockbox.apk
|
TEMP_APK := $(BUILDDIR)/bin/_Rockbox.apk
|
||||||
TEMP_APK2 := $(BUILDDIR)/bin/__Rockbox.apk
|
TEMP_APK2 := $(BUILDDIR)/bin/__Rockbox.apk
|
||||||
APK := $(BUILDDIR)/bin/Rockbox.apk
|
DEX := $(BUILDDIR)/bin/classes.dex
|
||||||
|
AP_ := $(BUILDDIR)/bin/resources.ap_
|
||||||
|
APK := $(BUILDDIR)/bin/Rockbox.apk
|
||||||
|
|
||||||
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
|
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
|
||||||
DIRS := $(subst ___,bin,$(_DIRS))
|
DIRS := $(subst ___,bin,$(_DIRS))
|
||||||
|
@ -50,8 +52,8 @@ DIRS += $(subst ___,gen,$(_DIRS))
|
||||||
DIRS += $(subst ___,data,$(_DIRS))
|
DIRS += $(subst ___,data,$(_DIRS))
|
||||||
DIRS += $(BUILDDIR)/libs/armeabi
|
DIRS += $(BUILDDIR)/libs/armeabi
|
||||||
|
|
||||||
$(R_JAVA): $(MANIFEST)
|
$(R_JAVA) $(AP_): $(MANIFEST)
|
||||||
$(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$<))$(AAPT) package -f -m -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res -I $(ANDROID_PLATFORM)/android.jar -F $(BUILDDIR)/bin/resources.ap_
|
$(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res -I $(ANDROID_PLATFORM)/android.jar -F $(AP_)
|
||||||
|
|
||||||
$(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class: $(R_JAVA)
|
$(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class: $(R_JAVA)
|
||||||
$(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$<))javac -d $(BUILDDIR)/bin \
|
$(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$<))javac -d $(BUILDDIR)/bin \
|
||||||
|
@ -63,12 +65,12 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.ja
|
||||||
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin -sourcepath \
|
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin -sourcepath \
|
||||||
$(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
|
$(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
|
||||||
|
|
||||||
classes: $(R_OBJ) $(JAVA_OBJ)
|
$(DEX): $(R_OBJ) $(JAVA_OBJ)
|
||||||
|
|
||||||
$(BUILDDIR)/bin/classes.dex: classes
|
|
||||||
$(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $(BUILDDIR)/bin
|
$(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $(BUILDDIR)/bin
|
||||||
|
|
||||||
dex: $(BUILDDIR)/bin/classes.dex
|
classes: $(R_OBJ) $(JAVA_OBJ)
|
||||||
|
|
||||||
|
dex: $(DEX)
|
||||||
|
|
||||||
$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY)
|
$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY)
|
||||||
$(call PRINTS,CP $(BINARY))cp $^ $@
|
$(call PRINTS,CP $(BINARY))cp $^ $@
|
||||||
|
@ -83,7 +85,7 @@ libs: $(LIBS)
|
||||||
|
|
||||||
$(TEMP_APK): libs dex
|
$(TEMP_APK): libs dex
|
||||||
$(call PRINTS,APK $(subst $(BUILDDIR)/,,$@))$(APKBUILDER) $@ \
|
$(call PRINTS,APK $(subst $(BUILDDIR)/,,$@))$(APKBUILDER) $@ \
|
||||||
-u -z $(BUILDDIR)/bin/resources.ap_ -f $(BUILDDIR)/bin/classes.dex -nf $(BUILDDIR)/libs
|
-u -z $(AP_) -f $(DEX) -nf $(BUILDDIR)/libs
|
||||||
|
|
||||||
$(APK): $(TEMP_APK)
|
$(APK): $(TEMP_APK)
|
||||||
$(SILENT)rm -f $@
|
$(SILENT)rm -f $@
|
||||||
|
@ -97,3 +99,7 @@ dirs:
|
||||||
$(SILENT)mkdir -p $(DIRS)
|
$(SILENT)mkdir -p $(DIRS)
|
||||||
|
|
||||||
apk: dirs $(APK)
|
apk: dirs $(APK)
|
||||||
|
|
||||||
|
clean::
|
||||||
|
$(SILENT)rm -f $(BUILDDIR)/bin/$(PACKAGE_PATH)/*.class $(R_JAVA) $(TEMP_APK) $(TEMP_APK2) $(APK) $(DEX) $(BUILDDIR)/_rockbox.zip $(AP_) $(LIBS)
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ tools: $(TOOLS)
|
||||||
veryclean: clean
|
veryclean: clean
|
||||||
$(SILENT)rm -rf $(TOOLS)
|
$(SILENT)rm -rf $(TOOLS)
|
||||||
|
|
||||||
clean:
|
clean::
|
||||||
$(SILENT)echo Cleaning build directory
|
$(SILENT)echo Cleaning build directory
|
||||||
$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
|
$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
|
||||||
rockbox.tar.bz2 TAGS apps firmware tools comsim sim lang lib \
|
rockbox.tar.bz2 TAGS apps firmware tools comsim sim lang lib \
|
||||||
|
|
Loading…
Reference in a new issue