GZIP_PROG =
endif
-
# Android 4.3 and earlier require Emacs to be signed with a different
# digital signature algorithm.
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 \
| 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 \
\f
+;; If either of the files examined by the following two functions does
+;; not exist, Emacs was configured `--disable-build-details'.
+
(defun android-read-build-system ()
"Obtain the host name of the system on which Emacs was built.
Use the data stored in the special file `/assets/build_info'.
Value is the string ``Unknown'' upon failure, else the hostname
of the build system."
- (with-temp-buffer
- (insert-file-contents "/assets/build_info")
- (let ((string (buffer-substring 1 (line-end-position))))
- (and (not (equal string "Unknown")) string))))
+ (when (file-exists-p "/assets/build_info")
+ (with-temp-buffer
+ (insert-file-contents "/assets/build_info")
+ (let ((string (buffer-substring 1 (line-end-position))))
+ (and (not (equal string "Unknown")) string)))))
(defun android-read-build-time ()
"Obtain the time at which Emacs was built.
Use the data stored in the special file `/assets/build_info'.
Value is nil upon failure, else the time in the same format as
returned by `current-time'."
- (with-temp-buffer
- (insert-file-contents "/assets/build_info")
- (end-of-line)
- (let ((number (read (current-buffer))))
- (time-convert number 'list))))
+ (when (file-exists-p "/assets/build_info")
+ (with-temp-buffer
+ (insert-file-contents "/assets/build_info")
+ (end-of-line)
+ (let ((number (read (current-buffer))))
+ (time-convert number 'list)))))
\f