From 8013784ff06217ef7977db6c22543d9ed21d35c9 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 27 Sep 2018 13:08:43 +0200 Subject: [PATCH] Use perl to construct GNUmakerules --- time_t/GNUmakefile | 4 ++-- time_t/GNUmakerules.pl | 8 ++++++++ time_t/GNUmakerules.sh | 5 ----- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 100755 time_t/GNUmakerules.pl delete mode 100755 time_t/GNUmakerules.sh diff --git a/time_t/GNUmakefile b/time_t/GNUmakefile index c9cfc71..d3625a5 100644 --- a/time_t/GNUmakefile +++ b/time_t/GNUmakefile @@ -12,7 +12,7 @@ install: $(BINDIR)/time_t GNUmakevars: GNUmakevars.sh sh ./$^ > $@ -GNUmakerules: GNUmakerules.sh - sh ./$^ > $@ +GNUmakerules: GNUmakerules.pl + perl ./$^ > $@ include GNUmakerules diff --git a/time_t/GNUmakerules.pl b/time_t/GNUmakerules.pl new file mode 100755 index 0000000..8f30daa --- /dev/null +++ b/time_t/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/time_t/GNUmakerules.sh b/time_t/GNUmakerules.sh deleted file mode 100755 index 952629f..0000000 --- a/time_t/GNUmakerules.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -echo "\$(BINDIR)/%: %" -echo -e "\tcp \$^ \$@" -echo "\$(MAN1DIR)/%: %" -echo -e "\tcp \$^ \$@"