From ca004e5037d8b42ba056660049ac22cfa83840bb Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Sun, 3 Jan 1999 12:26:22 +0000
Subject: [PATCH] Check for necessary configure reruns for Makefile and
 Make.rules generation.

---
 Make.rules.in | 6 +++++-
 Makefile.in   | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index 9e662aa088a..73acccbcbe6 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -136,9 +136,13 @@ $(BUILD) checkbuild:
 
 # Rule for main module
 
-$(MODULE).o: $(OBJS)
+$(MODULE).o: Makefile $(OBJS)
 	$(LDCOMBINE) $(OBJS) -o $(MODULE).o
 
+Makefile: Makefile.in $(TOPSRCDIR)/configure
+	@echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
+	@exit 1
+
 # Rules for auto documentation
 
 man: $(C_SRCS)
diff --git a/Makefile.in b/Makefile.in
index fdda26a96f6..f7f34af847f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -140,10 +140,14 @@ LIB_TARGET  = @LIB_TARGET@
 
 ALT_LINK    = @ALT_LINK@
 
-all: $(MAIN_TARGET)
+all: Makefile Make.rules $(MAIN_TARGET)
 
 @MAKE_RULES@
 
+Make.rules: Make.rules.in configure
+	@echo $? is newer than 'Make.rules', please rerun ./configure!
+	@exit 1
+
 install:: install_$(MAIN_TARGET)
 
 uninstall:: uninstall_$(MAIN_TARGET)
-- 
GitLab