diff --git a/ChangeLog b/ChangeLog index 18d1f903..d4587345 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-01-26 Akim Demaille + + * autoreconf.sh (autoheader): Run it when there is no template, as + there is no risk to override a handwritten template. + From Assar Westerlund. + 2001-01-26 Akim Demaille * aclang.m4: dnl AC_ARG_VAR's newline. diff --git a/autoreconf.in b/autoreconf.in index 67ebd7c5..6ecabf75 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -385,9 +385,13 @@ while read dir; do template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'` stamp_num=`test "$tcount" -gt 1 && echo "$tcount"` stamp=$template_dir/stamp-h$stamp_num.in - uses_autoheader=false; + # If config.hin exists, don't override it unless it was really + # created by autoheader (users are allowed to write them by hand!). + uses_autoheader=false grep autoheader "$template" >/dev/null 2>&1 && uses_autoheader=: + test -f "$template" || + uses_autoheader=: if $uses_autoheader && { $force || $update $template \ diff --git a/autoreconf.sh b/autoreconf.sh index 67ebd7c5..6ecabf75 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -385,9 +385,13 @@ while read dir; do template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'` stamp_num=`test "$tcount" -gt 1 && echo "$tcount"` stamp=$template_dir/stamp-h$stamp_num.in - uses_autoheader=false; + # If config.hin exists, don't override it unless it was really + # created by autoheader (users are allowed to write them by hand!). + uses_autoheader=false grep autoheader "$template" >/dev/null 2>&1 && uses_autoheader=: + test -f "$template" || + uses_autoheader=: if $uses_autoheader && { $force || $update $template \ diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 67ebd7c5..6ecabf75 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -385,9 +385,13 @@ while read dir; do template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'` stamp_num=`test "$tcount" -gt 1 && echo "$tcount"` stamp=$template_dir/stamp-h$stamp_num.in - uses_autoheader=false; + # If config.hin exists, don't override it unless it was really + # created by autoheader (users are allowed to write them by hand!). + uses_autoheader=false grep autoheader "$template" >/dev/null 2>&1 && uses_autoheader=: + test -f "$template" || + uses_autoheader=: if $uses_autoheader && { $force || $update $template \