diff --git a/cleandir/GNUmakefile b/cleandir/GNUmakefile index 924f293..f661bef 100644 --- a/cleandir/GNUmakefile +++ b/cleandir/GNUmakefile @@ -38,5 +38,10 @@ configure: $(CONFDIR)/start $(CONFDIR)/perl $(CONFDIR)/finish endif +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.sh + sh ./$^ > $@ + include GNUmakerules diff --git a/cleandir/GNUmakerules.sh b/cleandir/GNUmakerules.sh new file mode 100755 index 0000000..952629f --- /dev/null +++ b/cleandir/GNUmakerules.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" +echo "\$(MAN1DIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/cleandir/GNUmakevars.sh b/cleandir/GNUmakevars.sh new file mode 100755 index 0000000..1443f83 --- /dev/null +++ b/cleandir/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:"