From 27306a9b5149306911aa72ce31c4b93515cd1942 Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 17 May 2007 09:52:26 +0000 Subject: [PATCH] Create minimal GNUmakerules and GNUmakevars automatically. --- time_t/GNUmakefile | 8 +++++++- time_t/GNUmakerules.sh | 5 +++++ time_t/GNUmakevars.sh | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 time_t/GNUmakerules.sh create mode 100755 time_t/GNUmakevars.sh diff --git a/time_t/GNUmakefile b/time_t/GNUmakefile index cb1e1b7..0fac7f0 100644 --- a/time_t/GNUmakefile +++ b/time_t/GNUmakefile @@ -1,5 +1,4 @@ include GNUmakevars -include GNUmakerules all: time_t @@ -7,3 +6,10 @@ time_t: clean: rm time_t install: $(BINDIR)/time_t + +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.sh + sh ./$^ > $@ + +include GNUmakerules diff --git a/time_t/GNUmakerules.sh b/time_t/GNUmakerules.sh new file mode 100755 index 0000000..952629f --- /dev/null +++ b/time_t/GNUmakerules.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" +echo "\$(MAN1DIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/time_t/GNUmakevars.sh b/time_t/GNUmakevars.sh new file mode 100755 index 0000000..1443f83 --- /dev/null +++ b/time_t/GNUmakevars.sh @@ -0,0 +1,15 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" + +for i in "$prefix/share/man/man1" "$prefix/man/man1" +do + if [ -d "$i" -a -w "$i" ] + then + echo "MAN1DIR=$i" + break; + fi +done + +echo +echo "all:"