From 9a1b2a14f91994aad2db13a02fa5e716d6675cd6 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 20 Dec 2004 21:18:40 +0000 Subject: [PATCH] Automatically create GNUmakerules and GNUmakevars if they don't exist. --- tiny/GNUmakefile | 9 +++++++-- tiny/GNUmakerules.sh | 3 +++ tiny/GNUmakevars.sh | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 tiny/GNUmakerules.sh create mode 100755 tiny/GNUmakevars.sh diff --git a/tiny/GNUmakefile b/tiny/GNUmakefile index 78bfd06..a069140 100644 --- a/tiny/GNUmakefile +++ b/tiny/GNUmakefile @@ -1,8 +1,13 @@ -include GNUmakevars +-include GNUmakevars CONFDIR=../../configure CONFDIR_exists=$(shell [ -d $(CONFDIR) ] && echo ok) +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.sh + sh ./$^ > $@ + all: configure dus fnp fnpa fnpc isodate psg save crypt clean: @@ -45,4 +50,4 @@ configure: $(CONFDIR)/start \ endif -include GNUmakerules +-include GNUmakerules diff --git a/tiny/GNUmakerules.sh b/tiny/GNUmakerules.sh new file mode 100755 index 0000000..e523b37 --- /dev/null +++ b/tiny/GNUmakerules.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo "\$(BINDIR)/%: %" +echo -e "\tcp \$^ \$@" diff --git a/tiny/GNUmakevars.sh b/tiny/GNUmakevars.sh new file mode 100755 index 0000000..a7de4ae --- /dev/null +++ b/tiny/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"