diff --git a/chartab/GNUmakefile b/chartab/GNUmakefile index 7dfdcbe..54732fa 100644 --- a/chartab/GNUmakefile +++ b/chartab/GNUmakefile @@ -1,11 +1,19 @@ -include GNUmakevars +-include GNUmakevars all: chartab ctype-test -chartab: +chartab: chartab.pl + cp $^ $@ + ctype-test: clean: rm chartab install: $(BINDIR)/chartab $(BINDIR)/ctype-test -include GNUmakerules +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.pl + perl ./$^ > $@ + + +-include GNUmakerules diff --git a/chartab/GNUmakerules.pl b/chartab/GNUmakerules.pl new file mode 100644 index 0000000..15db030 --- /dev/null +++ b/chartab/GNUmakerules.pl @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; + +print "\$(BINDIR)/%: %\n"; +print "\tinstall -m 755 \$^ \$@\n"; +print "\$(MAN1DIR)/%: %\n"; +print "\tinstall -m 644 \$^ \$@\n"; diff --git a/chartab/GNUmakevars.sh b/chartab/GNUmakevars.sh new file mode 100644 index 0000000..a7de4ae --- /dev/null +++ b/chartab/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"