From c6a052f2fe53a26cdb0f3624a0b9af5201f3c487 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 30 Jun 2024 16:26:39 +0800 Subject: Respect --disable-build-details in Android builds * java/Makefile.in (BUILD_DETAILS, GEN_BUILD_DETAILS): New variables. (install_tmp): Tolerate failures in generation of metadata files and prefix commands for such generation with GEN_BUILD_DETAILS. * lisp/version.el (android-read-build-system) (android-read-build-time): Return nil if metadata file does not exist. --- java/Makefile.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'java') diff --git a/java/Makefile.in b/java/Makefile.in index 465f99162ec..3d5165d3186 100644 --- a/java/Makefile.in +++ b/java/Makefile.in @@ -57,7 +57,6 @@ else GZIP_PROG = endif - # Android 4.3 and earlier require Emacs to be signed with a different # digital signature algorithm. @@ -77,6 +76,11 @@ else AAPT_ASSET_ARGS = endif +# This will be replaced by `--no-build-details' if details of the build +# system are not to be recorded in generated packages. +BUILD_DETAILS = @BUILD_DETAILS@ +GEN_BUILD_DETAILS := $(if $(BUILD_DETAILS),true ||,) + SIGN_EMACS = -keystore $(srcdir)/emacs.keystore -storepass \ emacs1 $(JARSIGNER_FLAGS) SIGN_EMACS_V2 = sign --v2-signing-enabled --ks \ @@ -249,13 +253,13 @@ install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES) \ | xargs ${GZIP_PROG} -9n ; \ } # Produce metadata files providing build information and suchlike. - $(AM_V_SILENT) \ + -$(AM_V_SILENT) $(GEN_BUILD_DETAILS) \ { (cd $(top_srcdir) \ && git rev-parse HEAD || echo "Unknown") \ && (git rev-parse --abbrev-ref HEAD \ || echo "Unknown") } 2> /dev/null > \ install_temp/assets/version - $(AM_V_SILENT) \ + -$(AM_V_SILENT) $(GEN_BUILD_DETAILS) \ { hostname; date +%s; } > install_temp/assets/build_info # Produce the file index. $(AM_V_SILENT) $(libsrc)/asset-directory-tool \ -- cgit v1.2.1