diff --git a/ChangeLog b/ChangeLog index e563f7c1..af33e84c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2000-02-10 Akim Demaille + + 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 * acgeneral.m4 (AC_LIST_MEMBER_OF): s/ac_$exists/$ac_exists/! diff --git a/acgeneral.m4 b/acgeneral.m4 index d8abfcfa..d5744122 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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 <>$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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index d8abfcfa..d5744122 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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 <>$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