]> git.donarmstrong.com Git - lilypond.git/blobdiff - bin/wild-perl
release: 0.1.53
[lilypond.git] / bin / wild-perl
old mode 100644 (file)
new mode 100755 (executable)
index 83c2c82..ede94c2
@@ -1,6 +1,11 @@
 # -*- perl -*-
 ##! @PERL@
 
+use Getopt::Long;
+GetOptions("top-srcdir:s");
+
+$my_topsrcdir = $opt_top_srcdir ? $opt_top_srcdir : "\$(top_srcdir)";
+
 @ignorestuff = ();
 
 sub ignore_query
@@ -9,6 +14,9 @@ sub ignore_query
     return !grep(/$testfile/, @ignorestuff);
 }
 
+print "# Generated automatically by wild-perl 0.1\n";
+
+
 while (<>) {
        $line = $_;
        if ($line =~ /^ *nowildcard: *(.*)$/) {
@@ -17,6 +25,7 @@ while (<>) {
            foreach $i (@ignorelist) {
                print "# ignoring wildcards for \`$i\'\n";
                push @ignorestuff, $i; # concat ? uh?
+               print "IGNORE_WILDCARDS=$ignore";
            }
 
            
@@ -32,3 +41,9 @@ while (<>) {
            print $line;
        }
 }
+
+
+print "\$(srcdir)/Makefile.am: \$(srcdir)/Makefile.am.wild\n" .
+#    "\t\$(PERL) $my_topsrcdir/bin/wild-perl --top-srcdir=\"\$(real_topsrcdir)\" < \$< > \$@";
+    "\t\$(PERL) $my_topsrcdir/bin/wild-perl < \$< > \$@";
+