From ce339c38c75021b066102adb23ff8575274c6081 Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 5 Jul 2016 20:33:36 +0000 Subject: [PATCH] Automatically create GNUmakerules and GNUmakevars --- slowcat/GNUmakefile | 7 ++++++- slowcat/GNUmakerules.pl | 8 ++++++++ slowcat/GNUmakevars.sh | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 slowcat/GNUmakerules.pl create mode 100755 slowcat/GNUmakevars.sh diff --git a/slowcat/GNUmakefile b/slowcat/GNUmakefile index 0232bd4..f6ae7ff 100644 --- a/slowcat/GNUmakefile +++ b/slowcat/GNUmakefile @@ -8,6 +8,11 @@ clean: rm -f *.bak *.o core slowcat distclean: clean - rm -f *.d + rm -f *.d GNUmakerules GNUmakevars + +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.pl + perl ./$^ > $@ -include *.d diff --git a/slowcat/GNUmakerules.pl b/slowcat/GNUmakerules.pl new file mode 100644 index 0000000..8f30daa --- /dev/null +++ b/slowcat/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/slowcat/GNUmakevars.sh b/slowcat/GNUmakevars.sh new file mode 100755 index 0000000..a7de4ae --- /dev/null +++ b/slowcat/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"