mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[configure.ac] Added --enable-reproducible and --with-source-date-epoch=TIME
Example of usage: ./autogen.sh ./configure ... \ --enable-reproducible \ --with-source-date-epoch=$(git log -1 --pretty=%ct) make make -C doc html
This commit is contained in:
parent
3d58236d15
commit
e3992118c8
@ -50,7 +50,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
||||
host = @host@
|
||||
|
||||
ASCIIDOC = @PYTHON3@ $(top_srcdir)/doc/tools/asciidoc/asciidoc.py
|
||||
ASCIIDOC = LANG=C LANGUAGE=en CONFIG_REPRODUCIBLE=@CONFIG_REPRODUCIBLE@ SOURCE_DATE_EPOCH=@SOURCE_DATE_EPOCH@ @PYTHON3@ $(top_srcdir)/doc/tools/asciidoc/asciidoc.py
|
||||
ASCIIDOC_FLAGS = --unsafe
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
|
10
configure.ac
10
configure.ac
@ -1600,12 +1600,22 @@ EL_ARG_ENABLE(CONFIG_UTF8, utf-8, [UTF-8],
|
||||
EL_ARG_DEPEND(CONFIG_COMBINE, combining, [CONFIG_UTF8:yes HAVE_WCWIDTH:yes], [Combining characters],
|
||||
[ --enable-combining support Unicode combining characters (experimental)])
|
||||
|
||||
EL_ARG_ENABLE(CONFIG_REPRODUCIBLE, reproducible, [Reproducible builds],
|
||||
[ --enable-reproducible enable reproducible build])
|
||||
|
||||
AC_ARG_ENABLE(weehoofooboomookerchoo,
|
||||
[
|
||||
Also check out the features.conf file for more information about features!
|
||||
],
|
||||
[AC_MSG_ERROR(Are you strange, or what?)])
|
||||
|
||||
SOURCE_DATE_EPOCH=
|
||||
AC_ARG_WITH(source-date-epoch, [ --with-source-date-epoch=[TIME]
|
||||
set source date epoch for reproducible builds],
|
||||
[SOURCE_DATE_EPOCH="$withval"])
|
||||
|
||||
AC_SUBST(SOURCE_DATE_EPOCH)
|
||||
|
||||
|
||||
# ===================================================================
|
||||
# Decide whether to use TRE
|
||||
|
@ -1061,7 +1061,8 @@ class Document:
|
||||
self.safe = True # Default safe mode.
|
||||
def init_attrs(self):
|
||||
# Set implicit attributes.
|
||||
if os.environ.get('CONFIG_REPRODUCIBLE', ''):
|
||||
repro = os.environ.get('CONFIG_REPRODUCIBLE', '')
|
||||
if repro and repro != 'no':
|
||||
d = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
|
||||
self.attributes['localdate'] = time.strftime('%d-%b-%Y',d)
|
||||
s = time.strftime('%H:%M:%S %z',d)
|
||||
|
Loading…
Reference in New Issue
Block a user