mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 10:46:26 +00:00
Merge pull request #784 from bmwiedemann/date
Allow for reproducible builds
This commit is contained in:
commit
2ebbd3e318
@ -177,7 +177,7 @@ build-doc:
|
|||||||
build-man: docs/$(PROG_NAME).1.gz
|
build-man: docs/$(PROG_NAME).1.gz
|
||||||
|
|
||||||
docs/$(PROG_NAME).1.gz: docs/$(PROG_NAME).1
|
docs/$(PROG_NAME).1.gz: docs/$(PROG_NAME).1
|
||||||
$(call __silent,GZIP)gzip -c9 $< >$@
|
$(call __silent,GZIP)gzip -c9n $< >$@
|
||||||
|
|
||||||
define sed_it
|
define sed_it
|
||||||
$(call __silent,SED,$@)$(sed) -r \
|
$(call __silent,SED,$@)$(sed) -r \
|
||||||
|
10
configure.ac
10
configure.ac
@ -424,9 +424,13 @@ AC_SEARCH_LIBS(
|
|||||||
# Lastly, take care of crosstool-NG internal values
|
# Lastly, take care of crosstool-NG internal values
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Hey! We need the date! :-)
|
# Hey! We need the date! :-)
|
||||||
AC_SUBST(
|
DATE_FMT="%Y%m%d"
|
||||||
[DATE],
|
if test "x$SOURCE_DATE_EPOCH" = "x"; then
|
||||||
[$(date +%Y%m%d)])
|
DATE=$(date "+$DATE_FMT")
|
||||||
|
else
|
||||||
|
DATE="$(date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT")"
|
||||||
|
fi
|
||||||
|
AC_SUBST([DATE])
|
||||||
|
|
||||||
# Decorate the version string if needed
|
# Decorate the version string if needed
|
||||||
AS_IF(
|
AS_IF(
|
||||||
|
Loading…
Reference in New Issue
Block a user