From 18feafbe66336ce45de25c20275201648f80d131 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 6 Mar 2006 16:54:34 +0000 Subject: [PATCH] Added rules to automatically create GNUmakerules and GNUmakevars. --- pathtools/GNUmakefile | 5 +++++ pathtools/GNUmakerules.sh | 5 +++++ pathtools/GNUmakevars.sh | 15 +++++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 pathtools/GNUmakerules.sh create mode 100755 pathtools/GNUmakevars.sh diff --git a/pathtools/GNUmakefile b/pathtools/GNUmakefile index 13906a2..3d5c976 100644 --- a/pathtools/GNUmakefile +++ b/pathtools/GNUmakefile @@ -46,5 +46,10 @@ configure: $(CONFDIR)/start $(CONFDIR)/perl $(CONFDIR)/finish endif +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.sh + sh ./$^ > $@ + include GNUmakerules diff --git a/pathtools/GNUmakerules.sh b/pathtools/GNUmakerules.sh new file mode 100755 index 0000000..952629f --- /dev/null +++ b/pathtools/GNUmakerules.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" +echo "\$(MAN1DIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/pathtools/GNUmakevars.sh b/pathtools/GNUmakevars.sh new file mode 100755 index 0000000..1443f83 --- /dev/null +++ b/pathtools/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:"