aboutsummaryrefslogtreecommitdiff
path: root/libiberty/maint-tool
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-01-22 19:34:11 +0000
committerDJ Delorie <dj@redhat.com>2004-01-22 19:34:11 +0000
commit37254c9a9efe1273611bf5f23c5cf04cd19290e4 (patch)
tree462ebbaa101bf67b3cc738d388b8584360078662 /libiberty/maint-tool
parent51f72ab2bcdc0fc9977b4d9b570bdc8e17abcfa5 (diff)
downloadgdb-37254c9a9efe1273611bf5f23c5cf04cd19290e4.zip
gdb-37254c9a9efe1273611bf5f23c5cf04cd19290e4.tar.gz
gdb-37254c9a9efe1273611bf5f23c5cf04cd19290e4.tar.bz2
merge from gcc
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);