From c27ef5fab1555b18e9c5928e2f7f3ad56a91736f Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Thu, 23 Jul 2026 14:31:11 +0000 Subject: [PATCH] doc: document --disable-magic-builddate and the ccache options in INSTALL Add three configure options to the INSTALL option list: * --disable-magic-builddate -- omit the build date for reproducible builds (byte-identical objects for a given commit) and full ccache effectiveness. * --disable-ccache -- opt out of the auto-detected ccache. * --enable-ccache-prefix-map -- relativize embedded source paths for cross-tree ccache sharing (off by default; note the debugger and CCACHE_BASEDIR implications). Co-Authored-By: Claude Opus 4.8 (1M context) --- INSTALL | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/INSTALL b/INSTALL index a80553fc..68d17abf 100644 --- a/INSTALL +++ b/INSTALL @@ -53,6 +53,33 @@ Autoconf Capsule Summary: .mag files. Normally enabled, if the zlib development package is installed. + --disable-magic-builddate + Omit the build date/time from the binary. The date + is normally baked in (reported by "magic --version" + and written into some output files); omitting it makes + the build reproducible -- two builds of the same commit + then produce byte-identical objects and binaries, with + no dependence on when they were built. (It also keeps + ccache fully effective during development, since the + date is the one compile input that changes every + second.) Normally enabled. + + --disable-ccache + Do not use ccache even if it is installed. When + ccache is found on PATH it is auto-detected and used + to speed up recompiles (the build date is isolated to + one object so it does not spoil the cache); this + turns that off. + + --enable-ccache-prefix-map + Relativize the source paths embedded in compiled + objects so a ccache cache can be shared across + different checkouts / build directories. Off by + default (it makes debugger source paths relative, so + gdb needs "set substitute-path . "). Only + meaningful with ccache, and cross-tree cache hits also + need CCACHE_BASEDIR= set in the environment. + Notes to Magic maintainers: --------------------------