Commits

Shlomi Fish committed 0f282ef

Silence warnings in gen-helpers.pl.

Comments (0)

Files changed (2)

bin/gen-fortunes.pl

     my $orig_dir = getcwd();
 
     chdir("t2/humour/fortunes");
-    system("make", "dist");
-    system("make", "list_files");
+
+    if (-e 'friends')
+    {
+        system("make", "dist");
+    }
+
+    system("make", "-q", "list_files");
 
     chdir($orig_dir);
 }
 $text =~ s{ *humour/fortunes/\S+\.tar\.gz}{}g;
 io("include.mak")->print($text);
 
-system("./bin/gen-docbook-make-helpers.pl");
-system("./bin/gen-fortunes.pl");
-system("./bin/gen-deps-mak.pl");
+sub _my_system
+{
+    my $cmd = shift;
+
+    print join(' ', @$cmd), "\n";
+    if (system { $cmd->[0] } (@$cmd)) {
+        die "<<@$cmd>> failed.";
+    }
+}
+
+foreach my $cmd (
+    [ "./bin/gen-docbook-make-helpers.pl" ],
+    [ "./bin/gen-fortunes.pl" ],
+    [ "./bin/gen-deps-mak.pl" ],
+)
+{
+    _my_system($cmd);
+}
 
 1;