From 8598a4c6007e4197b5a382f52438731904244794 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 14 Sep 2006 09:40:00 +0200 Subject: [PATCH] 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 894c377ade0..9e7ec07330b 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -179,7 +179,7 @@ LINTS = $(C_SRCS:.c=.ln) # '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 @@ $(RC_BINARIES): $(BIN2RES) $(RC_BINSRC) $(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 72ee32eec55..df64bf00ef7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -103,10 +103,22 @@ fonts/__install__ loader/__install__ server/__install__: libs tools 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 e153f2f6503..3838f928726 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 229cecde0fb..0c1322a7e03 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 111d6054226..14ded8affe5 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)