]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of
authorAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 13:08:33 +0000 (13:08 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 13:08:33 +0000 (13:08 +0000)
`configure', not `config.status', hence use `conftest' for tmp
files, not `$ac_cs_root'.
Removed forgotten developer comment.
Double quoting the whole body is nicer than just the part that
needs to be.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index 8733e8eef0cb71fd8b053e1a7da5f82ee593734b..69ffac994dbb2a6c00ea14658dc9b8331e94dcad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-10  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of
+       `configure', not `config.status', hence use `conftest' for tmp
+       files, not `$ac_cs_root'.
+       Removed forgotten developer comment.
+       Double quoting the whole body is nicer than just the part that
+       needs to be.
+
 2000-02-10  Akim Demaille  <akim@epita.fr>
 
        * tests/torture.m4: Also check the value of @DEFS@ when no
index c4b039bfd61a50815f25164cae944031bbb76ff7..34ae937eca568d7ff75c06faa02bbe0640d8ef46 100644 (file)
@@ -3600,25 +3600,24 @@ chmod +x $CONFIG_STATUS
 # Set the DEFS variable to the -D options determined earlier.
 # This is a subroutine of AC_OUTPUT.
 # It is called inside configure, outside of config.status.
-# FIXME: This has to be fixed the same way as in _AC_OUTPUT_HEADERS.
+# Using a here document instead of a string reduces the quoting nightmare.
 define(AC_OUTPUT_MAKE_DEFS,
-[# Transform confdefs.h into DEFS.
-dnl Using a here document instead of a string reduces the quoting nightmare.
+[[# Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
 #
 # If the first sed substitution is executed (which looks for macros that
 # take arguments), then we branch to the cleanup section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat >$ac_cs_root.defs <<\EOF
-[s%^[  ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
+cat >conftest.defs <<\EOF
+s%^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
 t cleanup
 s%^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)%-D\1=\2%g
 : cleanup
 s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
 s%\[%\\&%g
 s%\]%\\&%g
-s%\$%$$%g]
+s%\$%$$%g
 EOF
 # We use echo to avoid assuming a particular line-breaking character.
 # The extra dot is to prevent the shell from consuming trailing
@@ -3627,9 +3626,9 @@ EOF
 # platform that uses two characters for line-breaks (e.g., DOS), tr
 # would break.
 ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f $ac_cs_root.defs
-])
+DEFS=`sed -f conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f conftest.defs
+]])# AC_OUTPUT_MAKE_DEFS
 
 
 # AC_OUTPUT_FILES
index c4b039bfd61a50815f25164cae944031bbb76ff7..34ae937eca568d7ff75c06faa02bbe0640d8ef46 100644 (file)
@@ -3600,25 +3600,24 @@ chmod +x $CONFIG_STATUS
 # Set the DEFS variable to the -D options determined earlier.
 # This is a subroutine of AC_OUTPUT.
 # It is called inside configure, outside of config.status.
-# FIXME: This has to be fixed the same way as in _AC_OUTPUT_HEADERS.
+# Using a here document instead of a string reduces the quoting nightmare.
 define(AC_OUTPUT_MAKE_DEFS,
-[# Transform confdefs.h into DEFS.
-dnl Using a here document instead of a string reduces the quoting nightmare.
+[[# Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
 #
 # If the first sed substitution is executed (which looks for macros that
 # take arguments), then we branch to the cleanup section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat >$ac_cs_root.defs <<\EOF
-[s%^[  ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
+cat >conftest.defs <<\EOF
+s%^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
 t cleanup
 s%^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)%-D\1=\2%g
 : cleanup
 s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
 s%\[%\\&%g
 s%\]%\\&%g
-s%\$%$$%g]
+s%\$%$$%g
 EOF
 # We use echo to avoid assuming a particular line-breaking character.
 # The extra dot is to prevent the shell from consuming trailing
@@ -3627,9 +3626,9 @@ EOF
 # platform that uses two characters for line-breaks (e.g., DOS), tr
 # would break.
 ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f $ac_cs_root.defs
-])
+DEFS=`sed -f conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f conftest.defs
+]])# AC_OUTPUT_MAKE_DEFS
 
 
 # AC_OUTPUT_FILES