aboutsummaryrefslogtreecommitdiff
path: root/libiberty/maint-tool
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/maint-tool')
-rw-r--r--libiberty/maint-tool17
1 files changed, 14 insertions, 3 deletions
diff --git a/libiberty/maint-tool b/libiberty/maint-tool
index 6b9bf7f..bfc5304 100644
--- a/libiberty/maint-tool
+++ b/libiberty/maint-tool
@@ -213,6 +213,12 @@ sub locals_first {
sub deps {
+ $crule = "\tif [ x\"\$(PICFLAG)\" != x ]; then \\\n";
+ $crule .= "\t \$(COMPILE.c) \$(PICFLAG) \$< -o pic/\$@; \\\n";
+ $crule .= "\telse true; fi\n";
+ $crule .= "\t\$(COMPILE.c) \$< \$(OUTPUT_OPTION)\n";
+ $crule .= "\n";
+
$incdir = shift @ARGV;
opendir(INC, $incdir);
@@ -260,10 +266,10 @@ sub deps {
@deps = sort { &locals_first($a,$b) } keys %scanned;
$obj = $f;
$obj =~ s/\.c$/.o/;
- $obj = "$obj:";
+ $obj = "./$obj:";
if ($#deps >= 0) {
- print OUT $obj;
- $len = length($obj);
+ print OUT "$obj \$(srcdir)/$f";
+ $len = length("$obj $f");
for $dt (@deps) {
$d = $mine{$dt};
if ($len + length($d) > 70) {
@@ -275,7 +281,12 @@ sub deps {
}
}
print OUT "\n";
+ } else {
+ print OUT "$obj \$(srcdir)/$f\n";
}
+ $c = $crule;
+ $c =~ s@\$\<@\$\(srcdir\)\/$f@g;
+ print OUT $c;
}
}
closedir(S);