Add GNUmakerules, GNUmakevars

This commit is contained in:
hjp 2016-07-05 19:39:39 +00:00
parent 378a0a9f70
commit 3ef0c01ff0
3 changed files with 21 additions and 0 deletions

View File

@ -10,4 +10,12 @@ chartab:
clean: clean:
rm -f charhist core foo bar baz rm -f charhist core foo bar baz
distclean: clean
rm -f GNUmakerules GNUmakevars
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.pl
perl ./$^ > $@
install: $(BINDIR)/charhist install: $(BINDIR)/charhist

8
charhist/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
charhist/GNUmakevars.sh Executable file
View File

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