~ chicken-core (master) 56f9991b70dd023819edd325689ce11b76ca6099
commit 56f9991b70dd023819edd325689ce11b76ca6099
Author: Mario Domenech Goulart <mario@parenteses.org>
AuthorDate: Thu May 14 16:45:05 2026 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu May 14 17:52:16 2026 +0200
configure: Make config.make settings not overridable through the environment
Setting build parameters with ?= in config.make makes it possible to
override them though the environment, which can cause surprises and
even be dangerous.
This change uses = for assigments in config.make, which prevents
settings in config.make from being overridden through the environment.
Build settings configured in config.make can still be overridden in
make invocations as command line arguments (e.g., make PREFIX=...).
Signed-off-by: felix <felix@call-with-current-continuation.org>
diff --git a/configure b/configure
index d09a045f..5672f80a 100755
--- a/configure
+++ b/configure
@@ -258,22 +258,22 @@ else
fi
echo "# GENERATED BY configure" > config.make
-echo "PLATFORM ?= $platform" >> config.make
-echo "PREFIX ?= $prefix" >> config.make
-test -n "$debug" && echo "DEBUGBUILD ?= 1" >> config.make
-test -n "$static" && echo "STATICBUILD ?= 1" >> config.make
-test -n "$CC" && echo "C_COMPILER ?= $cccmd" >> config.make
-test -n "$linker" && echo "LINKER ?= $linker" >> config.make
-test -n "$CFLAGS" && echo "C_COMPILER_OPTIMIZATION_OPTIONS ?= $CFLAGS" >> config.make
-test -n "$host" && echo "HOSTSYSTEM ?= $host" >> config.make
-test -n "$target" && echo "TARGETSYSTEM ?= $target" >> config.make
-test -n "$pprefix" && echo "PROGRAM_PREFIX ?= $pprefix" >> config.make
-test -n "$psuffix" && echo "PROGRAM_SUFFIX ?= $psuffix" >> config.make
-test -n "$tprefix" && echo "TARGET_PREFIX ?= $tprefix" >> config.make
-test -n "$srcdir" && echo "SRCDIR ?= $srcdir" >> config.make
-test -n "$vardir" && echo "VARDIR ?= $vardir" >> config.make
-test -n "$chicken" && echo "CHICKEN ?= $chicken" >> config.make
-test -n "$pobjs" && echo "PROFILE_OBJECTS ?= $pobjs" >> config.make
+echo "PLATFORM = $platform" >> config.make
+echo "PREFIX = $prefix" >> config.make
+test -n "$debug" && echo "DEBUGBUILD = 1" >> config.make
+test -n "$static" && echo "STATICBUILD = 1" >> config.make
+test -n "$CC" && echo "C_COMPILER = $cccmd" >> config.make
+test -n "$linker" && echo "LINKER = $linker" >> config.make
+test -n "$CFLAGS" && echo "C_COMPILER_OPTIMIZATION_OPTIONS = $CFLAGS" >> config.make
+test -n "$host" && echo "HOSTSYSTEM = $host" >> config.make
+test -n "$target" && echo "TARGETSYSTEM = $target" >> config.make
+test -n "$pprefix" && echo "PROGRAM_PREFIX = $pprefix" >> config.make
+test -n "$psuffix" && echo "PROGRAM_SUFFIX = $psuffix" >> config.make
+test -n "$tprefix" && echo "TARGET_PREFIX = $tprefix" >> config.make
+test -n "$srcdir" && echo "SRCDIR = $srcdir" >> config.make
+test -n "$vardir" && echo "VARDIR = $vardir" >> config.make
+test -n "$chicken" && echo "CHICKEN = $chicken" >> config.make
+test -n "$pobjs" && echo "PROFILE_OBJECTS = $pobjs" >> config.make
echo
echo "now run ${mkcmd} to build the system"
Trap