makefiles: Output the top-level clean rules explicitly for each module.
diff --git a/Makefile.in b/Makefile.in
index 31896bb..50d239d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,8 +27,6 @@
LIBEXT = @LIBEXT@
MODULE = none
-ALL_DIRS = @ALL_DIRS@
-
# Sub-directories that don't have a makefile
EXTRASUBDIRS = dlls libs
@@ -63,18 +61,14 @@
# 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 dcc0359..914e6f6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -146,7 +146,6 @@
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_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 e2524a0..a8f1cb9 100755
--- a/configure
+++ b/configure
@@ -598,7 +598,6 @@
LIBOBJS
ALL_PROGRAM_BIN_INSTALL_DIRS
ALL_TEST_BINARIES
-ALL_DIRS
ALL_SYMLINKS
ALL_MAKERULES
ALL_WINETEST_DEPENDS
@@ -13855,8 +13854,6 @@
ALL_SYMLINKS=""
-ALL_DIRS=""
-
ALL_TEST_BINARIES=""
ALL_PROGRAM_BIN_INSTALL_DIRS=""
@@ -13876,7 +13873,10 @@
{
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__