From 3cc14dc3fbadd9b7b65ee6980da08947e12b8816 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 25 Mar 2010 22:12:12 +0100 Subject: [PATCH] makefiles: Output the top-level clean rules explicitly for each module. --- Makefile.in | 12 +++--------- aclocal.m4 | 6 ++++-- configure | 8 ++++---- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Makefile.in b/Makefile.in index 31896bb51c0..50d239dacce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,8 +27,6 @@ VPATH = @srcdir@ LIBEXT = @LIBEXT@ MODULE = none -ALL_DIRS = @ALL_DIRS@ - # Sub-directories that don't have a makefile EXTRASUBDIRS = dlls libs @@ -63,18 +61,14 @@ $(ALL_CONFIGS): # Rules for cleaning -$(ALL_DIRS:%=%/__clean__): dummy - @cd `dirname $@` && $(MAKE) clean - -clean:: $(ALL_DIRS:%=%/__clean__) - $(RM) $(ALL_DIRS:%=%/Makefile) tools/makedep$(EXEEXT) +.PHONY: __clean__ +clean:: __clean__ + $(RM) tools/makedep$(EXEEXT) distclean:: clean $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h $(ALL_CONFIGS) $(RM) -r autom4te.cache -.PHONY: distclean $(ALL_DIRS:%=%/__clean__) - # Dependencies between directories # dependencies needed to build any dll or program diff --git a/aclocal.m4 b/aclocal.m4 index dcc03597b07..914e6f6a3bd 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -146,7 +146,6 @@ AC_SUBST(ALL_WINETEST_DEPENDS,["# Test binaries"]) AC_SUBST(ALL_MAKERULES,"") AC_SUBST(ALL_SYMLINKS,"") -AC_SUBST(ALL_DIRS,"") AC_SUBST(ALL_TEST_BINARIES,"") AC_SUBST(ALL_PROGRAM_BIN_INSTALL_DIRS,"") @@ -164,7 +163,10 @@ wine_fn_all_dir_rules () { wine_fn_append_file ALL_DIRS $[1] wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"$[1]/__clean__: $[1]/Makefile +"__clean__ .PHONY: $[1]/__clean__ +$[1]/__clean__: $[1]/Makefile + @cd $[1] && \$(MAKE) clean + \$(RM) $[1]/Makefile $[1]/Makefile: $[1]/Makefile.in config.status $[2] @./config.status --file $[1]/Makefile && cd $[1] && \$(MAKE) depend depend .PHONY: $[1]/__depend__ diff --git a/configure b/configure index e2524a01907..a8f1cb9813e 100755 --- a/configure +++ b/configure @@ -598,7 +598,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS ALL_PROGRAM_BIN_INSTALL_DIRS ALL_TEST_BINARIES -ALL_DIRS ALL_SYMLINKS ALL_MAKERULES ALL_WINETEST_DEPENDS @@ -13855,8 +13854,6 @@ ALL_MAKERULES="" ALL_SYMLINKS="" -ALL_DIRS="" - ALL_TEST_BINARIES="" ALL_PROGRAM_BIN_INSTALL_DIRS="" @@ -13876,7 +13873,10 @@ wine_fn_all_dir_rules () { wine_fn_append_file ALL_DIRS $1 wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"$1/__clean__: $1/Makefile +"__clean__ .PHONY: $1/__clean__ +$1/__clean__: $1/Makefile + @cd $1 && \$(MAKE) clean + \$(RM) $1/Makefile $1/Makefile: $1/Makefile.in config.status $2 @./config.status --file $1/Makefile && cd $1 && \$(MAKE) depend depend .PHONY: $1/__depend__