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:"