Prevent some 'underquoted' warns.
[macros.git] / AutoGen.pm
index 1ebee43..0a533f6 100644 (file)
@@ -296,6 +296,7 @@ my($class,%args)=@_;
                @subdirs=glob $glob;
                confess "Invalid glob $glob: ".join(",",@subdirs) if 1!=@subdirs;
                }
+       $base||=$subdirs[0];
        rename $subdirs[0],$base or confess "$!";
        _system(join(" ","cd ".$base.";dpkg-buildpackage",
                        "-rfakeroot",
@@ -399,7 +400,7 @@ sub _cleanfiles
 
 sub _cleanfilesfordir
 {
-my($dir)=@_;
+my($dir,@cleanfiles)=@_;
 
        return map({
                           if (m#^\Q$dir\E/([^/]+)$#) { # this-dir: "./this-dir/file-name.c"
@@ -417,7 +418,7 @@ my($dir)=@_;
                        else {
                                        ();
                                        }
-                       } _cleanfiles());
+                       } @cleanfiles);
 }
 
 sub _cvsdirs
@@ -490,7 +491,7 @@ my($class,%options)=@_;
                          "rpmtest"  ,sub { $class->_rpmbuild("sign"=>0); },
                          "deb"      ,sub { $class->_debbuild("sign"=>1); },
                          "debtest"  ,sub { $class->_debbuild("sign"=>0); },
-                         "cleanfilesfordir=s",sub { print "$_\n" for (_cleanfilesfordir $_[1]); exit 0; },
+                         "cleanfilesfordir=s",sub { print "$_\n" for (_cleanfilesfordir($_[1],_cleanfiles())); exit 0; },
                          "dist"     ,\$Options{"ARGV_dist"},
                          "copy!"    ,\$Options{"ARGV_copy"},
                          "clean"    ,\$Options{"ARGV_clean"},
@@ -505,7 +506,7 @@ my($class,%options)=@_;
                }
 
        for my $dir (_cvsdirs(".")) {
-               my @cleanfilesfordir=_cleanfilesfordir $dir;
+               my @cleanfilesfordir=_cleanfilesfordir $dir,_cleanfiles();
                _writefile $dir."/.cvsignore",map("$_\n",@cleanfilesfordir) if !$Options{"ARGV_fullclean"};
                _remove "nocheck",\1,map({ _expandclass("$dir/$_"); } grep({
                                $Options{"ARGV_fullclean"} or $_ ne ".cvsignore";
@@ -886,7 +887,13 @@ Include both B<debian/changelog.in> and B<debian/changelog> to B<Makefile.am>.
 
 =item
 
-Use B<@VERSION_BASE@> in B<debian/changelog.in>.
+Include B<debian/changelog> to B<clean> field in B<autogen.pl>.
+
+=item
+
+Use B<@VERSION@> in B<debian/changelog.in>. Package will be built as
+Debian-native package (no I<.diff> file) as the patches are not just for Debian
+packages, it is a new package (read: dpkg does not support branch patches).
 
 =back