Alexandre Julliard : makefiles: Attempt to automatically run make depend when reading an updated makefile.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 14 10:09:57 CDT 2006


Module: wine
Branch: master
Commit: 8598a4c6007e4197b5a382f52438731904244794
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=8598a4c6007e4197b5a382f52438731904244794

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep 14 09:40:00 2006 +0200

makefiles: Attempt to automatically run make depend when reading an updated makefile.

---

 Make.rules.in     |    8 +-------
 Makefile.in       |   16 ++++++++++++++--
 configure         |    5 +++++
 configure.ac      |    5 +++++
 tools/Makefile.in |    2 ++
 5 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index 894c377..9e7ec07 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -179,7 +179,7 @@ # Implicit rules
 
 # 'all' target first in case the enclosing Makefile didn't define any target
 
-all: Makefile
+all:
 
 filter: dummy
 	@$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all
@@ -193,12 +193,6 @@ # Rules for resources
 
 $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) $(IDL_TLB_SRCS:.idl=.tlb)
 
-# Rules for makefile
-
-Makefile: Makefile.in $(TOPSRCDIR)/configure
-	@echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
-	@exit 1
-
 # Rule for linting
 
 $(MODULE).ln : $(LINTS)
diff --git a/Makefile.in b/Makefile.in
index 72ee32e..df64bf0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -103,10 +103,22 @@ fonts/__install__ loader/__install__ ser
 programs/__install__: libs tools include dlls/__install-lib__
 tools/__install-lib__ tools/__install-dev__: tools
 
-depend $(SUBDIRS:%=%/__depend__): $(MAKEDEP)
+RECURSE_TARGETS = \
+	$(SUBDIRS) \
+	$(SUBDIRS:%=%/__clean__) \
+	$(SUBDIRS:%=%/__depend__) \
+	$(SUBDIRS:%=%/__install-dev__) \
+	$(SUBDIRS:%=%/__install-lib__) \
+	$(SUBDIRS:%=%/__install__) \
+	$(SUBDIRS:%=%/__uninstall__) \
+	$(TESTSUBDIRS:%=%/__crosstest__) \
+	$(TESTSUBDIRS:%=%/__test__) \
+	$(TESTSUBDIRS:%=%/__testclean__)
+
+depend $(RECURSE_TARGETS): $(MAKEDEP)
 
 $(MAKEDEP):
-	@cd $(TOOLSDIR)/tools && $(MAKE) makedep
+	@cd $(TOOLSDIR)/tools && $(MAKE) makedep$(EXEEXT)
 
 # Test rules
 
diff --git a/configure b/configure
index e153f2f..3838f92 100755
--- a/configure
+++ b/configure
@@ -23765,6 +23765,11 @@ esac
 
 DEPENDENCIES="### Dependencies:
 
+.INIT: Makefile
+.BEGIN: Makefile
+Makefile: dummy
+	-\$(MAKEDEP) -C\$(SRCDIR) -S\$(TOPSRCDIR) -T\$(TOPOBJDIR) \$(EXTRAINCL) \$(DEPEND_SRCS)
+
 \$(ALL_OBJS): \$(IDL_SRCS:.idl=.h)
 \$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
 \$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"
diff --git a/configure.ac b/configure.ac
index 229cecd..0c1322a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1459,6 +1459,11 @@ dnl **** Generate output files ****
 
 AC_SUBST(DEPENDENCIES,"### Dependencies:
 
+.INIT: Makefile
+.BEGIN: Makefile
+Makefile: dummy
+	-\$(MAKEDEP) -C\$(SRCDIR) -S\$(TOPSRCDIR) -T\$(TOPOBJDIR) \$(EXTRAINCL) \$(DEPEND_SRCS)
+
 \$(ALL_OBJS): \$(IDL_SRCS:.idl=.h)
 \$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
 \$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)")
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 111d605..14ded8a 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -95,3 +95,5 @@ uninstall::
 	-$(UPDATE_DESKTOP_DATABASE)
 
 @DEPENDENCIES@  # everything below this line is overwritten by make depend
+
+Makefile: makedep$(EXEEXT)




More information about the wine-cvs mailing list