New configure option --disable-magic-builddate omits the build date from the
binary. It is wired via an AC_SUBST'd MAGIC_BUILDDATE_DEFS (not AC_DEFINE), so
it reaches only buildinfo.o rather than @DEFS@ / every command line:
* enabled (default): buildinfo.o gets -DMAGIC_BUILDDATE="<date>" and defs.mak
computes the date (SOURCE_DATE_EPOCH-aware);
* disabled: buildinfo.o gets -DMAGIC_NO_BUILDDATE instead, defs.mak skips the
date computation entirely (no parse-time `date` spawn), and buildinfo.c
reports an empty MagicCompileTime.
This gives a fully reproducible build whose one volatile input (the date) is
gone; what remains in buildinfo.o is commit/version/revision, which do not
change second-to-second -- the intended pairing with ccache for day-to-day
development.
Verified both configs: default bakes the date + commit; --disable-magic-builddate
compiles buildinfo.o with -DMAGIC_NO_BUILDDATE (no date), commit still present.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| config.guess | ||
| config.sub | ||
| configure | ||
| configure.in | ||
| configure_mac | ||
| defs.mak.in | ||
| install-sh | ||
| magic.spec.in | ||
| makedbh.in | ||
| missing | ||
| mkdirs | ||
| mkinstalldirs | ||
| preproc.py | ||
| printmans | ||