From df7e457273153461399378a243946302ea9a8440 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 4 Apr 2001 13:39:10 +0000 Subject: [PATCH] [project @ 2001-04-04 13:39:09 by simonmar] Automatically re-generate and re-run configure as necessary. This seems to be a reasonable thing to do, and it should eliminate a large class of "I ran cvs update and now I get this strange error" type of reports. If anyone can remember why this might not be a good idea (I vaguely remember there being some reason but it escapes me now), please pipe up. --- Makefile | 10 ---------- Makefile.config | 3 ++- mk/boilerplate.mk | 21 ++++++++++++++++++--- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 40167e7..5dcfa3a 100644 --- a/Makefile +++ b/Makefile @@ -35,16 +35,6 @@ project-check : fi # ----------------------------------------------------------------------------- -# Make sure configure is up-to-date - -all install dist binary-dist :: configure -configure :: configure.in - @echo "WARNING: configure needs to be regenerated. Type" - @echo " make -f Makefile.config ./configure" - @echo "and rerun make." - @exit 16 - -# ----------------------------------------------------------------------------- # Making a binary distribution # # To make a particular binary distribution: diff --git a/Makefile.config b/Makefile.config index 90c5ab4..1d10829 100644 --- a/Makefile.config +++ b/Makefile.config @@ -2,7 +2,7 @@ all: configure -configure: configure.in +configure: configure.in aclocal.m4 rm -f configure.new autoconf configure.in > configure.new \ || ( rm -f configure.new; exit 1 ) @@ -10,6 +10,7 @@ configure: configure.in mv configure.new configure chmod +x configure chmod -w configure + if test -f config.status; then ./config.status --recheck; fi rm -f configure.new CONFIG_H_IN = ghc/includes/config.h.in diff --git a/mk/boilerplate.mk b/mk/boilerplate.mk index d20d167..cdf920b 100644 --- a/mk/boilerplate.mk +++ b/mk/boilerplate.mk @@ -26,9 +26,24 @@ FPTOOLS_TOP := $(TOP) default: all - -# Now follow the pieces of boilerplate -# The "-" signs tell make not to complain if they don't exist +# ----------------------------------------------------------------------------- +# make sure the autoconf stuff is up to date... + +$(TOP)/mk/config.mk : $(TOP)/mk/config.mk.in $(TOP)/mk/config.h.in $(TOP)/configure + @if test ! -f $(FPTOOLS_TOP)/config.status; then \ + echo "You haven't run $(FPTOOLS_TOP)/configure yet."; \ + exit 1; \ + fi + @echo "Running $(FPTOOLS_TOP)/config.status to update configuration info..." + @( cd $(FPTOOLS_TOP) && ./config.status ) + +$(TOP)/configure : $(TOP)/configure.in $(TOP)/aclocal.m4 + @echo "Regenerating $(FPTOOLS_TOP)/configure..." + @( cd $(FPTOOLS_TOP) && make -f Makefile.config ./configure ) + +# ----------------------------------------------------------------------------- +# Now follow the pieces of boilerplate +# The "-" signs tell make not to complain if they don't exist include $(TOP)/mk/config.mk # All configuration information -- 1.7.10.4