From 0f501292a0d10daa1af1534f2760212419693f07 Mon Sep 17 00:00:00 2001 From: hjp Date: Wed, 2 Jun 2010 08:15:02 +0000 Subject: [PATCH] automatically create GNUmakerules and GNUmakevars --- shuffle/GNUmakefile | 23 ++++++++++++++++++++++- shuffle/GNUmakerules.sh | 3 +++ shuffle/GNUmakevars.sh | 5 +++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 shuffle/GNUmakerules.sh create mode 100755 shuffle/GNUmakevars.sh 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:"