Automatically create GNUmakerules and GNUmakevars

This commit is contained in:
hjp 2016-07-05 20:33:36 +00:00
parent 247743c9dd
commit ce339c38c7
3 changed files with 19 additions and 1 deletions

View File

@ -8,6 +8,11 @@ clean:
rm -f *.bak *.o core slowcat rm -f *.bak *.o core slowcat
distclean: clean distclean: clean
rm -f *.d rm -f *.d GNUmakerules GNUmakevars
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.pl
perl ./$^ > $@
-include *.d -include *.d

8
slowcat/GNUmakerules.pl Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/perl
use warnings;
use strict;
print "\$(BINDIR)/%: %\n";
print "\tcp \$^ \$@\n";
print "\$(MAN1DIR)/%: %\n";
print "\tcp \$^ \$@\n";

5
slowcat/GNUmakevars.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
prefix=${prefix:-/usr/local}
echo "BINDIR=$prefix/bin"
echo
echo "all:"