From: Alan T. DeKok Date: Tue, 27 Jan 2026 21:30:28 +0000 (-0500) Subject: move build-radpaths.h to an inline GNU make rule. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb7fdfc38d0a27645bf6ae1f1ffcb6c5f83f58a1;p=thirdparty%2Ffreeradius-server.git move build-radpaths.h to an inline GNU make rule. Which is a fair bit simpler. --- diff --git a/configure b/configure index 2fa1329aa51..72421dddd7b 100755 --- a/configure +++ b/configure @@ -16219,8 +16219,6 @@ fi ac_config_commands="$ac_config_commands stamp-h" -ac_config_commands="$ac_config_commands build-radpaths-h" - ac_config_commands="$ac_config_commands main-chmod" ac_config_commands="$ac_config_commands scripts-chmod" @@ -16229,7 +16227,7 @@ ac_config_commands="$ac_config_commands scripts-chmod" -ac_config_files="$ac_config_files ./Make.inc ./src/include/build-radpaths-h ./src/bin/checkrad ./src/bin/radtest ./scripts/rc.radiusd ./scripts/cron/radiusd.cron.daily ./scripts/cron/radiusd.cron.monthly ./scripts/util/cryptpasswd ./raddb/radrelay.conf ./raddb/radiusd.conf" +ac_config_files="$ac_config_files ./Make.inc ./src/bin/checkrad ./src/bin/radtest ./scripts/rc.radiusd ./scripts/cron/radiusd.cron.daily ./scripts/cron/radiusd.cron.monthly ./scripts/util/cryptpasswd ./raddb/radrelay.conf ./raddb/radiusd.conf" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16932,11 +16930,9 @@ do case $ac_config_target in "src/include/autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/autoconf.h" ;; "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;; - "build-radpaths-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-radpaths-h" ;; "main-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS main-chmod" ;; "scripts-chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS scripts-chmod" ;; "./Make.inc") CONFIG_FILES="$CONFIG_FILES ./Make.inc" ;; - "./src/include/build-radpaths-h") CONFIG_FILES="$CONFIG_FILES ./src/include/build-radpaths-h" ;; "./src/bin/checkrad") CONFIG_FILES="$CONFIG_FILES ./src/bin/checkrad" ;; "./src/bin/radtest") CONFIG_FILES="$CONFIG_FILES ./src/bin/radtest" ;; "./scripts/rc.radiusd") CONFIG_FILES="$CONFIG_FILES ./scripts/rc.radiusd" ;; @@ -17496,7 +17492,6 @@ printf "%s\n" "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "stamp-h":C) echo timestamp > src/include/stamp-h ;; - "build-radpaths-h":C) (cd ./src/include && /bin/sh ./build-radpaths-h) ;; "main-chmod":C) (cd ./src/bin && chmod +x checkrad radtest) ;; "scripts-chmod":C) (cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly util/cryptpasswd) ;; diff --git a/configure.ac b/configure.ac index 510469aff86..9906ca8e343 100644 --- a/configure.ac +++ b/configure.ac @@ -2625,7 +2625,6 @@ dnl # And finally, output the results. dnl # dnl ############################################################# AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > src/include/stamp-h]) -AC_CONFIG_COMMANDS([build-radpaths-h], [(cd ./src/include && /bin/sh ./build-radpaths-h)]) AC_CONFIG_COMMANDS([main-chmod], [(cd ./src/bin && chmod +x checkrad radtest)]) AC_CONFIG_COMMANDS([scripts-chmod], [(cd ./scripts && chmod +x rc.radiusd cron/radiusd.cron.daily cron/radiusd.cron.monthly util/cryptpasswd)]) @@ -2637,7 +2636,6 @@ AC_SUBST(INSTALLSTRIP) AC_CONFIG_FILES([\ ./Make.inc \ - ./src/include/build-radpaths-h \ ./src/bin/checkrad \ ./src/bin/radtest \ ./scripts/rc.radiusd \ diff --git a/src/include/all.mk b/src/include/all.mk index 09228632407..45424c29972 100644 --- a/src/include/all.mk +++ b/src/include/all.mk @@ -104,9 +104,27 @@ src/include/missing.h: src/include/missing-h src/include/autoconf.sed @$(ECHO) HEADER $@ ${Q}sed -f src/include/autoconf.sed < $< > $@ -src/include/radpaths.h: src/include/build-radpaths-h +# +# Define and export the configure arguments from GNU Make to a +# header file. +# +# We can't just use radpaths.h.in and @logdir@, because of the way +# that autoconf deals with paths. +# +define include_defs +#define LOGDIR "${logdir}" +#define LIBDIR "${libdir}" +#define CONFDIR "${raddbdir}" +#define RUNDIR "${RUNDIR}" +#define SBINDIR "${sbindir}" +#define RADIR "${radacctdir}" +#define DICTDIR "${dictdir}" +endef +export include_defs + +src/include/radpaths.h: Make.inc @$(ECHO) HEADER $@ - ${Q}cd src/include && /bin/sh build-radpaths-h + ${Q}echo "$$include_defs" > $@ # # Create the soft link for the fake include file paths. diff --git a/src/include/build-radpaths-h.in b/src/include/build-radpaths-h.in deleted file mode 100644 index a0009d266cf..00000000000 --- a/src/include/build-radpaths-h.in +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# -# build-radpaths-h -# Script to generate radpaths.h file. This is needed to -# work around the weird way "autoconf" substitutes things -# that are generated in anyway from a command line -# argument having to do with a path (--prefix etc) -# -# Version: $Id$ -# - -# Location of files. -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sysconfdir=@sysconfdir@ -localstatedir=@localstatedir@ -libdir=@libdir@ -bindir=@bindir@ -sbindir=@sbindir@ -mandir=@mandir@ -logdir=@logdir@ -raddbdir=@raddbdir@ -dictdir=@dictdir@ -radacctdir=@radacctdir@ -datarootdir=@datarootdir@ - -cat < radpaths.h -/* Automatically generated by "build-radpaths-h" */ -#define LOGDIR "@logdir@" -#define LIBDIR "@libdir@" -#define CONFDIR "@raddbdir@" -#define RUNDIR "@localstatedir@/run" -#define SBINDIR "@sbindir@" -#define RADIR "@radacctdir@" -#define DICTDIR "@dictdir@" -EOF -