diff --git a/charhist/GNUmakefile b/charhist/GNUmakefile index f5db7a3..9fdd420 100644 --- a/charhist/GNUmakefile +++ b/charhist/GNUmakefile @@ -10,4 +10,12 @@ chartab: clean: rm -f charhist core foo bar baz +distclean: clean + rm -f GNUmakerules GNUmakevars + +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.pl + perl ./$^ > $@ + install: $(BINDIR)/charhist diff --git a/charhist/GNUmakerules.pl b/charhist/GNUmakerules.pl new file mode 100644 index 0000000..8f30daa --- /dev/null +++ b/charhist/GNUmakerules.pl @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; + +print "\$(BINDIR)/%: %\n"; +print "\tcp \$^ \$@\n"; +print "\$(MAN1DIR)/%: %\n"; +print "\tcp \$^ \$@\n"; diff --git a/charhist/GNUmakevars.sh b/charhist/GNUmakevars.sh new file mode 100755 index 0000000..a7de4ae --- /dev/null +++ b/charhist/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"