]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move build-radpaths.h to an inline GNU make rule.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jan 2026 21:30:28 +0000 (16:30 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jan 2026 21:33:38 +0000 (16:33 -0500)
Which is a fair bit simpler.

configure
configure.ac
src/include/all.mk
src/include/build-radpaths-h.in [deleted file]

index 2fa1329aa51956a4d123ed2da8442ee9ca01f33a..72421dddd7b64df84e7598630b947670556c7d01 100755 (executable)
--- 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
   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) ;;
 
index 510469aff86e4165da1988476e019af2fbfa88e6..9906ca8e343a1e15dd9c2e8229329dd0888e96cf 100644 (file)
@@ -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 \
index 09228632407cda0418e9d28dbef7f4f32ffadccd..45424c29972616624999a8a5aff145befa44d3a3 100644 (file)
@@ -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 (file)
index a0009d2..0000000
+++ /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 <<EOF > 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
-