[project @ 2001-04-04 13:39:09 by simonmar]
authorsimonmar <unknown>
Wed, 4 Apr 2001 13:39:10 +0000 (13:39 +0000)
committersimonmar <unknown>
Wed, 4 Apr 2001 13:39:10 +0000 (13:39 +0000)
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
Makefile.config
mk/boilerplate.mk

index 40167e7..5dcfa3a 100644 (file)
--- 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: 
index 90c5ab4..1d10829 100644 (file)
@@ -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
index d20d167..cdf920b 100644 (file)
@@ -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