fix build
authorGuillaume Castagnino <casta@xwing.info>
Fri, 30 Jun 2017 09:21:45 +0000 (11:21 +0200)
committerGuillaume Castagnino <casta@xwing.info>
Fri, 30 Jun 2017 09:21:45 +0000 (11:21 +0200)
Makefile
dist-google/Makefile [new file with mode: 0644]
dist-google/cm-data/99-perso-google-clean.sh.addon [moved from cm-data-google/99-perso-google-clean.sh.addon with 100% similarity]
dist-google/cm.sh [moved from cm-google.sh with 81% similarity]
dist-std/Makefile [new file with mode: 0644]
dist-std/cm-data/10-perso.sh.init [moved from cm-data/10-perso.sh.init with 100% similarity]
dist-std/cm-data/99-perso.sh.addon [moved from cm-data/99-perso.sh.addon with 100% similarity]
dist-std/cm-data/libjni_latinimegoogle.so [moved from cm-data/libjni_latinimegoogle.so with 100% similarity]
dist-std/cm-data/tzdata [moved from cm-data/tzdata with 100% similarity]
dist-std/cm.sh [moved from cm.sh with 100% similarity]

index 8a8faa86691cbbfe39fa47122690988df14acff2..09b4b84e8f77f8e4f3546478ae455ab88c2f8fa9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,14 +5,11 @@ ZIPFILE_GOOGLE_SIGNED = cm-custom-google-signed.zip
 PRIVKEY = tools/testkey.pk8
 PUBKEY = tools/testkey.x509.pem
 
-DIRS_COMMON = META-INF
-DIRS = cm-data
-DIRS_GOOGLE = cm-data-google
-FILES_COMMON = $(shell find $(DIRS_COMMON) -type f)
-FILES = cm.sh $(shell find $(DIRS) -type f)
-FILES_GOOGLE = cm-google.sh $(shell find $(DIRS_GOOGLE) -type f)
+STD = dist-std
+GOOGLE = dist-google
+FILES_COMMON = $(shell find META-INF -type f)
 
-.PHONY: clean
+.PHONY: clean $(STD) $(GOOGLE)
 
 all: zip
 
@@ -26,10 +23,10 @@ sign: $(ZIPFILE) $(ZIPFILE_GOOGLE)
        java -jar tools/SignApk.jar -w -a 4 $(PUBKEY) $(PRIVKEY) $(ZIPFILE_GOOGLE) $(ZIPFILE_GOOGLE_SIGNED)
        @echo "$(ZIPFILE_SIGNED) and $(ZIPFILE_GOOGLE_SIGNED) are ready"
 
-$(ZIPFILE): clean $(FILES_COMMON:%=%.zipped) $(FILES:%=%.zipped)
+$(ZIPFILE): clean $(FILES_COMMON:%=%.zipped) $(STD)
        @echo "$(ZIPFILE) is ready"
 
-$(ZIPFILE_GOOGLE): clean $(FILES_COMMON:%=%.zipped) $(FILES_GOOGLE:%=%.zipped)
+$(ZIPFILE_GOOGLE): clean $(FILES_COMMON:%=%.zipped) $(GOOGLE)
        @echo "$(ZIPFILE_GOOGLE) is ready"
 
 $(FILES_COMMON:%=%.zipped): %.zipped : %
@@ -37,10 +34,8 @@ $(FILES_COMMON:%=%.zipped): %.zipped : %
        @zip "$(ZIPFILE)" "$<"
        @zip "$(ZIPFILE_GOOGLE)" "$<"
 
-$(FILES:%=%.zipped): %.zipped : %
-       @echo "Zipping standard files"
-       @zip "$(ZIPFILE)" "$<"
+$(STD):
+       make -C $(STD) ZIPFILE=$(ZIPFILE)
 
-$(FILES_GOOGLE:%=%.zipped): %.zipped : %
-       @echo "Zipping google debloat files"
-       @zip "$(ZIPFILE_GOOGLE)" "$<"
+$(GOOGLE):
+       make -C $(GOOGLE) ZIPFILE=$(ZIPFILE_GOOGLE)
diff --git a/dist-google/Makefile b/dist-google/Makefile
new file mode 100644 (file)
index 0000000..3a3bd3a
--- /dev/null
@@ -0,0 +1,7 @@
+FILES = $(shell find -type f ! -name Makefile)
+
+all: $(FILES:%=%.zipped)
+
+$(FILES:%=%.zipped): %.zipped : %
+       @echo "Zipping standard files"
+       @zip "../$(ZIPFILE)" "$<"
similarity index 81%
rename from cm-google.sh
rename to dist-google/cm.sh
index 942f4a8e12dbf2d3497ac72ea790272b447e8481..78331aea4a4b92eaf30d710aca10718fd716f085 100755 (executable)
@@ -8,7 +8,7 @@ export PATH="${PATH}:/system/bin:/system/xbin"
 
 # install restore script
 echo "Installing restore script"
-cp cm-data-google/99-perso-google-clean.sh.addon /system/addon.d/99-perso-google-clean.sh
+cp cm-data/99-perso-google-clean.sh.addon /system/addon.d/99-perso-google-clean.sh
 chown root:root /system/addon.d/99-perso-google-clean.sh
 chmod 755 /system/addon.d/99-perso-google-clean.sh
 
diff --git a/dist-std/Makefile b/dist-std/Makefile
new file mode 100644 (file)
index 0000000..3a3bd3a
--- /dev/null
@@ -0,0 +1,7 @@
+FILES = $(shell find -type f ! -name Makefile)
+
+all: $(FILES:%=%.zipped)
+
+$(FILES:%=%.zipped): %.zipped : %
+       @echo "Zipping standard files"
+       @zip "../$(ZIPFILE)" "$<"
similarity index 100%
rename from cm-data/tzdata
rename to dist-std/cm-data/tzdata
similarity index 100%
rename from cm.sh
rename to dist-std/cm.sh