From 72c7f8d3e41d95982a317272f67d64ebf4f6f145 Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 5 Apr 2008 10:04:53 +0000 Subject: [PATCH] added GNUmake*.sh --- errno/GNUmakefile | 16 +++++++++++++--- errno/GNUmakerules.sh | 5 +++++ errno/GNUmakevars.sh | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100755 errno/GNUmakerules.sh create mode 100755 errno/GNUmakevars.sh diff --git a/errno/GNUmakefile b/errno/GNUmakefile index 21f4a2d..79c9bef 100644 --- a/errno/GNUmakefile +++ b/errno/GNUmakefile @@ -1,6 +1,9 @@ -# $Id: GNUmakefile,v 1.3 2003-02-14 11:59:43 hjp Exp $ +# $Id: GNUmakefile,v 1.4 2008-04-05 10:04:53 hjp Exp $ # $Log: GNUmakefile,v $ -# Revision 1.3 2003-02-14 11:59:43 hjp +# Revision 1.4 2008-04-05 10:04:53 hjp +# added GNUmake*.sh +# +# Revision 1.3 2003/02/14 11:59:43 hjp # Added list of #defines from HP-UX. # # Revision 1.2 1998/05/31 01:20:06 hjp @@ -8,7 +11,6 @@ # include GNUmakevars -include GNUmakerules all: errno @@ -18,4 +20,12 @@ errno_list.c: errno.list make_errno_list clean: rm errno + +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.sh + sh ./$^ > $@ + install: $(BINDIR)/errno + +include GNUmakerules diff --git a/errno/GNUmakerules.sh b/errno/GNUmakerules.sh new file mode 100755 index 0000000..952629f --- /dev/null +++ b/errno/GNUmakerules.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" +echo "\$(MAN1DIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/errno/GNUmakevars.sh b/errno/GNUmakevars.sh new file mode 100755 index 0000000..1443f83 --- /dev/null +++ b/errno/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:"