Commit 5852f7a1 authored by Alexandre Julliard's avatar Alexandre Julliard

Run make clean in all directories, even the ones we don't compile in.

Simplified sub-directories rules a bit.
parent 261e28a7
......@@ -118,19 +118,23 @@ printf NEWMAKE "\n\n";
################################################################
# 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 @@ foreach my $mod (sort keys %directories)
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 @@ print NEWMAKE "# Inter-dll dependencies\n\n";
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 $mod (keys %imports)
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 @@ foreach my $mod (keys %linkable_dlls)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment