automatically create GNUmakerules and GNUmakevars

This commit is contained in:
hjp 2010-06-02 08:15:02 +00:00
parent 3163f7d94d
commit 0f501292a0
3 changed files with 30 additions and 1 deletions

View File

@ -1,5 +1,9 @@
include GNUmakevars
include GNUmakerules
CONFDIR=../../configure
CONFDIR_exists=$(shell [ -d $(CONFDIR) ] && echo ok)
all: shuffle
shuffle: shuffle.o
$(CC) $^ -lant -o $@
@ -11,3 +15,20 @@ install: $(BINDIR)/shuffle
distclean: clean
rm -f *.bak *.d
GNUmakevars: GNUmakevars.sh
sh ./$^ > $@
GNUmakerules: GNUmakerules.sh
sh ./$^ > $@
customize: configure
sh ./configure
ifeq ($(CONFDIR_exists),ok)
configure: $(CONFDIR)/start $(CONFDIR)/perl $(CONFDIR)/finish
cat $^ > $@
endif
include GNUmakerules

3
shuffle/GNUmakerules.sh Executable file
View File

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

5
shuffle/GNUmakevars.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
prefix=${prefix:-/usr/local}
echo "BINDIR=$prefix/bin"
echo
echo "all:"