blob: 59248e4374554030f9fa4281ef1f478bfa88ef50 [file] [log] [blame]
# Remove files generated by autoreconf -fi.
# For use by the clean target in debian/rules.
set -e
# Remove specified files from the current directory.
# Each line must be a filename, a comment (starting with #),
# a simple glob (of the form *.extension), or blank.
# Filenames are restricted to a small character set.
use strict;
use warnings;
my $fnchar = qr/[-_~.@[:alnum:]]/;
my $empty = qr/^$/;
my $comment = qr/^#/;
my $simple = qr/^$fnchar+$/;
my $glob = qr/^\*$fnchar+$/;
while (my $line = <>) {
chomp $line;
next if $line =~ $empty;
next if $line =~ $comment;
if ($line =~ $simple) {
unlink $line;
if ($line =~ $glob) {
unlink glob($line);
die "cannot parse $line";
rm -f debug/translation.bash tests/test_block.c
rm -f ABOUT-NLS aclocal.m4 configure
(cd po && perl -e "$remove_files") < debian/generated-po.list
(cd m4 && perl -e "$remove_files") < debian/generated-m4.list
(cd build-aux && perl -e "$remove_files") < debian/generated-build-aux.list
find . -name -delete