Author: mcbrown
Date: 2007-11-28 16:42:19 +0100 (Wed, 28 Nov 2007)
New Revision: 8940
Log:
Add a specialized dependencies generation for Arby targets to ensure fragments are built correctly
Modified:
trunk/tools/xmldepend-post.pl
Modified: trunk/tools/xmldepend-post.pl
===================================================================
--- trunk/tools/xmldepend-post.pl 2007-11-28 15:15:35 UTC (rev 8939)
+++ trunk/tools/xmldepend-post.pl 2007-11-28 15:42:19 UTC (rev 8940)
Changed blocks: 3, Lines Added: 28, Lines Deleted: 0; 1548 bytes
@@ -157,6 +157,10 @@
}
}
+# Variable to hold potential arbitrary targets
+
+my $arbitrary_targets = {};
+
# For each file, put out all the variable definitions that apply to it,
# then dependencies for target types given in --target-list. The
# variables must be defined first, before the target dependencies
@@ -170,6 +174,18 @@
$base =~ s/\.xml$//;
($base_under = $base) =~ s/[-.]/_/g;
+ # For files that are really generated by the arby process
+ # we work out what the target was and then force a rebuild
+ # of the arby file
+
+ if ($file =~ m{-aspec\.xml\..*\.xml})
+ {
+ my $arbtarget = $file;
+ $arbtarget =~ s/(.*?)-aspec\.xml.*$/$1/;
+ push @{$arbitrary_targets->{$arbtarget}},$file;
+ next;
+ }
+
# produce variable definition for all included files
@files = sort @{$file_lines{$file}};
@@ -255,6 +271,18 @@
print "\n";
}
+# If we have arbitrary targets, then generate rules that will
+# regenerate any arbitrary fragments by deleting and re-running
+# the arbitrary build process
+
+foreach my $arbtarget (keys %{$arbitrary_targets})
+{
+ print(join(' ',@{$arbitrary_targets->{$arbtarget}}),":\n");
+ print("\t",'$(RM)'," $arbtarget.xml $arbtarget-arbitrary.xml\n");
+ print("\t",'$(MAKE)'," $arbtarget.xml\n");
+ print("\n");
+}
+
sub define_variable
{
my ($var, @files) = @_;
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r8940 - trunk/tools | mcbrown | 28 Nov |