summaryrefslogtreecommitdiff
path: root/break_filelist
diff options
context:
space:
mode:
authorRonald Aigner <ra3@os.inf.tu-dresden.de>2012-04-11 12:21:24 +0200
committerJari Aalto <jari.aalto@cante.net>2012-04-11 12:21:24 +0200
commit3631b59ffd43c6aa49ea1f31f47861983908db79 (patch)
tree4dd325db8cfb1b2ec3661dcbcf3ed47322bda45a /break_filelist
parentb420f0b7af30848bfed4bfbf41f3a0ba473ce5eb (diff)
Ignore autotools generated files
Gbp-Pq: Name 40_bts281293_ignore_autotools_files.patch
Diffstat (limited to 'break_filelist')
-rwxr-xr-xbreak_filelist20
1 files changed, 20 insertions, 0 deletions
diff --git a/break_filelist b/break_filelist
index 021d913..abc9875 100755
--- a/break_filelist
+++ b/break_filelist
@@ -149,6 +149,7 @@ $noisy = 0; # Set to 1 if you want noisy reports.
# .am automake input
%file_extensions = (
+ "am" => "makefile",
"c" => "ansic",
"ec" => "ansic", # Informix C.
"ecp" => "ansic", # Informix C.
@@ -975,6 +976,23 @@ sub get_file_type {
return "auto";
}
+ # Skip files generated by auto-* tools. These can be identified by a
+ # matching file with an ".in" or ".am" extension.
+ if (-s "${file_to_examine}.in") {
+ print "Note: Auto-generated file $file_to_examine\n"
+ if $noisy;
+ return "auto";
+ }
+ if ($file_to_examine =~ m/\.in$/) {
+ $possible_auto = $file_to_examine;
+ $possible_auto =~ s/\.in$/\.am/;
+ if (-s "$possible_auto") {
+ print "Note: Auto-generated file $file_to_examine\n"
+ if $noisy;
+ return "auto";
+ }
+ }
+
if (($basename eq "lex.yy.c") || # Flex/Lex output!
($basename eq "lex.yy.cc") || # Flex/Lex output - C++ scanner.
($basename eq "y.code.c") || # yacc/bison output.
@@ -1053,6 +1071,8 @@ sub get_file_type {
if (($file_to_examine =~ m/\bmakefile$/i) ||
($file_to_examine =~ m/\bmakefile\.txt$/i) ||
($file_to_examine =~ m/\bmakefile\.pc$/i) ||
+ ($file_to_examine =~ m/\bmakefile\.in$/i) ||
+ ($file_to_examine =~ m/\bmakefile\.am$/i) ||
($file_to_examine =~ m/\bdebian\/rules$/i)) { # "debian/rules" too.
return "makefile";
}