From 4563b0a53a7a24e752eb6fd9cbb8e6ddb33a08a9 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Fri, 23 Aug 2019 10:27:42 +0200 Subject: [PATCH] Use Perl version of chartab and autoconfigure GNUmake* --- chartab/GNUmakefile | 14 +++++++++++--- chartab/GNUmakerules.pl | 8 ++++++++ chartab/GNUmakevars.sh | 5 +++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 chartab/GNUmakerules.pl create mode 100644 chartab/GNUmakevars.sh 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:"