diff --git a/shuffle/GNUmakefile b/shuffle/GNUmakefile index 7762d9e..3ee2ab3 100644 --- a/shuffle/GNUmakefile +++ b/shuffle/GNUmakefile @@ -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 diff --git a/shuffle/GNUmakerules.sh b/shuffle/GNUmakerules.sh new file mode 100755 index 0000000..e523b37 --- /dev/null +++ b/shuffle/GNUmakerules.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/shuffle/GNUmakevars.sh b/shuffle/GNUmakevars.sh new file mode 100755 index 0000000..a7de4ae --- /dev/null +++ b/shuffle/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"