Use Perl version of chartab and autoconfigure GNUmake*

This commit is contained in:
Peter J. Holzer 2019-08-23 10:27:42 +02:00
parent 5de6672e2a
commit 4563b0a53a
3 changed files with 24 additions and 3 deletions

View File

@ -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

8
chartab/GNUmakerules.pl Normal file
View File

@ -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";

5
chartab/GNUmakevars.sh Normal file
View File

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