automatically create GNUmake*

This commit is contained in:
hjp 2007-02-27 08:39:04 +00:00
parent 90cfb3a468
commit 163fc81775
3 changed files with 27 additions and 1 deletions

View File

@ -1,5 +1,4 @@
include GNUmakevars include GNUmakevars
include GNUmakerules
all: scat $(patsubst %.msg, %.cat, $(wildcard *.msg)) all: scat $(patsubst %.msg, %.cat, $(wildcard *.msg))
@ -15,3 +14,10 @@ clean:
rm -f *.cat *.o scat core scat.h rm -f *.cat *.o scat core scat.h
install: $(BINDIR)/scat install: $(BINDIR)/scat
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.sh
sh ./$^ > $@
include GNUmakerules

5
scat/GNUmakerules.sh Executable file
View File

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

15
scat/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:"