Added rules to automatically create GNUmakerules and GNUmakevars.

This commit is contained in:
hjp 2006-03-06 16:54:34 +00:00
parent 1488372199
commit 18feafbe66
3 changed files with 25 additions and 0 deletions

View File

@ -46,5 +46,10 @@ configure: $(CONFDIR)/start $(CONFDIR)/perl $(CONFDIR)/finish
endif endif
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.sh
sh ./$^ > $@
include GNUmakerules include GNUmakerules

5
pathtools/GNUmakerules.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "\$(BINDIR)/%: %"
echo -e "\tcp \$^ \$@"
echo "\$(MAN1DIR)/%: %"
echo -e "\tcp \$^ \$@"

15
pathtools/GNUmakevars.sh Executable file
View File

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