]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Avoid calling `rm' without arguments.
authorAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 10:37:03 +0000 (10:37 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 10:37:03 +0000 (10:37 +0000)
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a
quoted here doc to output the section providing defaults for
CONFIG_*.
Don't rm the CONFIG_FILES here but in..
(AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here.
Hm, actually, no, just don't remove them at all, let the newly
created files replace the old ones, exactly as in
AC_OUTPUT_HEADERS.
From Graham Jenkins.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index e563f7c13ebf150a6ad77fdb1736e5df200c98d1..af33e84c34d2bc90afcb952d9b8fc5f94f0893d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-02-10  Akim Demaille  <akim@epita.fr>
+
+       Avoid calling `rm' without arguments.
+
+       * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a
+       quoted here doc to output the section providing defaults for
+       CONFIG_*.
+       Don't rm the CONFIG_FILES here but in..
+       (AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here.
+       Hm, actually, no, just don't remove them at all, let the newly
+       created files replace the old ones, exactly as in
+       AC_OUTPUT_HEADERS.
+       From Graham Jenkins.
+
 2000-02-10  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (AC_LIST_MEMBER_OF): s/ac_$exists/$ac_exists/!
index d8abfcfaca6a3b918a1d2ff84bd08f2a6f921826..d5744122ff98ef119896b894f399950722d0163a 100644 (file)
@@ -3541,25 +3541,23 @@ dnl Issue this section only if there were actually config files.
 dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS,
 dnl or AC_LIST_LINKS is set.
 ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
-[cat >>$CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<\EOF
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
-if [\$]ac_need_defaults; then
-ifset([AC_LIST_FILES], [  : \${CONFIG_FILES=\$config_files}
+if $ac_need_defaults; then
+ifset([AC_LIST_FILES], [  : ${CONFIG_FILES=$config_files}
 ])dnl
-ifset([AC_LIST_HEADERS], [  : \${CONFIG_HEADERS=\$config_headers}
+ifset([AC_LIST_HEADERS], [  : ${CONFIG_HEADERS=$config_headers}
 ])dnl
-ifset([AC_LIST_LINKS], [  : \${CONFIG_LINKS=\$config_links}
+ifset([AC_LIST_LINKS], [  : ${CONFIG_LINKS=$config_links}
 ])dnl
-ifset([AC_LIST_COMMANDS], [  : \${CONFIG_COMMANDS=\$config_commands}
+ifset([AC_LIST_COMMANDS], [  : ${CONFIG_COMMANDS=$config_commands}
 ])dnl
 fi
 
-# Remove all the CONFIG_FILES, and trap to remove the temp files.
-dnl There is no need to trap for the config files since they are built
-dnl from `mv tmp-file config-file', hence their update is atomic.
-rm -fr \`echo "\$CONFIG_FILES" | sed "s/:@BKL@^ @BKR@*//g"\`
-trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+# Trap to remove the temp files.
+dnl FIXME: Should we check that there are files to remove?
+trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15
 
 EOF
 ])[]dnl ifval
index d8abfcfaca6a3b918a1d2ff84bd08f2a6f921826..d5744122ff98ef119896b894f399950722d0163a 100644 (file)
@@ -3541,25 +3541,23 @@ dnl Issue this section only if there were actually config files.
 dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS,
 dnl or AC_LIST_LINKS is set.
 ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
-[cat >>$CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<\EOF
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
-if [\$]ac_need_defaults; then
-ifset([AC_LIST_FILES], [  : \${CONFIG_FILES=\$config_files}
+if $ac_need_defaults; then
+ifset([AC_LIST_FILES], [  : ${CONFIG_FILES=$config_files}
 ])dnl
-ifset([AC_LIST_HEADERS], [  : \${CONFIG_HEADERS=\$config_headers}
+ifset([AC_LIST_HEADERS], [  : ${CONFIG_HEADERS=$config_headers}
 ])dnl
-ifset([AC_LIST_LINKS], [  : \${CONFIG_LINKS=\$config_links}
+ifset([AC_LIST_LINKS], [  : ${CONFIG_LINKS=$config_links}
 ])dnl
-ifset([AC_LIST_COMMANDS], [  : \${CONFIG_COMMANDS=\$config_commands}
+ifset([AC_LIST_COMMANDS], [  : ${CONFIG_COMMANDS=$config_commands}
 ])dnl
 fi
 
-# Remove all the CONFIG_FILES, and trap to remove the temp files.
-dnl There is no need to trap for the config files since they are built
-dnl from `mv tmp-file config-file', hence their update is atomic.
-rm -fr \`echo "\$CONFIG_FILES" | sed "s/:@BKL@^ @BKR@*//g"\`
-trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+# Trap to remove the temp files.
+dnl FIXME: Should we check that there are files to remove?
+trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15
 
 EOF
 ])[]dnl ifval