Run make clean in all directories, even the ones we don't compile in.
Simplified sub-directories rules a bit.
diff --git a/dlls/make_dlls b/dlls/make_dlls
index 35f42fc..106589a 100755
--- a/dlls/make_dlls
+++ b/dlls/make_dlls
@@ -118,19 +118,23 @@
################################################################
# output the subdirs list
-print NEWMAKE <<EOF;
-# Subdir list
-
-SUBDIRS = \\
-EOF
-printf NEWMAKE "\t\$(EXTRADIRS)";
+print NEWMAKE "# Subdir list\n\nBASEDIRS =";
foreach my $dir (sort values %directories)
{
next if defined($special_dlls{$dir}); # skip special dlls
printf NEWMAKE " \\\n\t%s", $dir;
}
-printf NEWMAKE "\n";
+printf NEWMAKE "\n\nSUBDIRS = \\\n\t\$(BASEDIRS)";
+foreach my $dir (sort keys %special_dlls)
+{
+ printf NEWMAKE " \\\n\t%s", $dir;
+}
+printf NEWMAKE <<EOF;
+
+
+BUILDSUBDIRS = \$(BASEDIRS) \$(EXTRADIRS)
+EOF
################################################################
# output the all: target
@@ -179,7 +183,7 @@
printf NEWMAKE " %s\$(DLLEXT)", $i;
}
}
- printf NEWMAKE ": %s/%s\$(DLLEXT)\n", $directories{$mod}, $mod;
+ printf NEWMAKE ": %s\n", $directories{$mod};
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/%s\$(DLLEXT) \$@\n\n", $directories{$mod}, $mod;
}
@@ -192,28 +196,28 @@
my @depends = ();
foreach my $mod (sort keys %imports)
{
- my $count = 1;
- my $dep = sprintf("%s/%s\$(DLLEXT): dummy", $directories{$mod}, $mod);
+ my $count = 0;
+ my $dep = sprintf("%s:", $directories{$mod});
+ $dep .= " " x (8-length($directories{$mod}));
foreach my $i (@{$imports{$mod}})
{
- if ($count++ >= 3)
+ if ($count++ >= 4)
{
- $count = 0;
- $dep .= " \\\n ";
+ $count = 1;
+ $dep .= " \\\n" . " " x 9;
}
$dep .= sprintf(" %s\$(DLLEXT)", $i);
}
foreach my $i (@{$linked_dlls{$mod}})
{
- if ($count++ >= 3)
+ if ($count++ >= 4)
{
- $count = 0;
- $dep .= " \\\n ";
+ $count = 1;
+ $dep .= " \\\n" . " " x 9;
}
$dep .= sprintf(" lib%s.\$(LIBEXT)", $i);
}
- $dep .= sprintf("\n\t\@cd %s && \$(MAKE) %s\$(DLLEXT)\n\n",$directories{$mod}, $mod);
- push @depends, $dep;
+ push @depends, $dep . "\n";
}
print NEWMAKE sort @depends;
@@ -227,10 +231,10 @@
foreach my $i (@{$linked_dlls{$mod}}) { $linkable_dlls{$i} = 1; }
}
-print NEWMAKE "# Special targets for dlls that we need to link to\n\n";
+print NEWMAKE "\n# Special targets for dlls that we need to link to\n\n";
foreach my $mod (keys %linkable_dlls)
{
- printf NEWMAKE "lib%s.\$(LIBEXT): %s/%s\$(DLLEXT)\n", $mod, $directories{$mod}, $mod;
+ printf NEWMAKE "lib%s.\$(LIBEXT): %s\n", $mod, $directories{$mod};
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/%s\$(DLLEXT) \$@\n\n", $directories{$mod}, $mod;
}
@@ -240,17 +244,17 @@
print NEWMAKE <<EOF;
# Misc rules
-\$(SUBDIRS:%=%/__checklink__): dummy
+\$(BUILDSUBDIRS:%=%/__checklink__): dummy
\@cd `dirname \$\@` && \$(MAKE) checklink
-install:: \$(SUBDIRS:%=%/__install__)
+install:: \$(BUILDSUBDIRS:%=%/__install__)
-uninstall:: \$(SUBDIRS:%=%/__uninstall__)
+uninstall:: \$(BUILDSUBDIRS:%=%/__uninstall__)
-rmdir \$(dlldir)
-check test:: \$(SUBDIRS:%=%/__test__)
+check test:: \$(BUILDSUBDIRS:%=%/__test__)
-checklink:: \$(SUBDIRS:%=%/__checklink__)
+checklink:: \$(BUILDSUBDIRS:%=%/__checklink__)
EOF
close NEWMAKE;