'ChangeLog' filename is now configurable by '$Options{"ChangeLog"}'.
[macros.git] / AutoGen.pm
index 554310a..343d463 100644 (file)
@@ -177,7 +177,7 @@ my($class,$name)=@_;
                        "ARGV"=>[qw(--copy)],
                        "configure_args"=>[split /\s+/,$configure_args],
                        );
-       _remove "ChangeLog";    # force its rebuild by Makefile/rcs2log
+       _remove $Options{"ChangeLog"} || "ChangeLog";   # force its rebuild by Makefile/rcs2log
        _system "make dist $name.spec";
 }
 
@@ -274,7 +274,6 @@ sub _cleanfiles
                                                ./missing
                                                ./mkinstalldirs
                                                ./libtool ./ltconfig ./ltmain.sh
-                                               ./ChangeLog
                                                ./ABOUT-NLS
                                                ./<name>-[0-9]* ./<name>-devel-[0-9]*
                                                ./<name>.spec ./<name>.m4 ./<name>.spec.m4
@@ -285,6 +284,7 @@ sub _cleanfiles
                                                ./po/*.gmo ./po/*.mo ./po/stamp-cat-id ./po/<name>.pot ./po/ChangeLog
                                                ./po/Makevars ./po/Makevars.template ./po/Rules-quot ./po/*.sed ./po/*.sin ./po/*.header
                                                ),
+                               map(("./$_"),($Options{"ChangeLog"} || "ChangeLog")),
                                map((!$_ ? () : do { my $dir=$_; map("$dir/$_",qw(
                                                *.stamp
                                                sgml*
@@ -500,7 +500,7 @@ my($class,%options)=@_;
        _system qw(autoheader) if $Options{"want-autoheader"};
        # "ChangeLog" is reqd by automake(1)
        # Don't remove it afterwards as it may still be needed during automatic automake Makefile rebuilds
-       File::Touch->new("atime_only"=>1)->touch("ChangeLog");
+       File::Touch->new("atime_only"=>1)->touch("ChangeLog") if !$Options{"ChangeLog"};
        _system qw(automake --add-missing),@copy_arg;
        _system qw(autoconf);
        # Why it is left there after RedHat autoconf-2.53-8 ?