-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.parrot.org/parrot/branches/depends@40391 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
- Loading branch information
petdance
committed
Aug 3, 2009
1 parent
808cb17
commit 6a3fa79
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
# This dependency builder is about as brute-force as it gets, but it's | ||
# better than nothing. | ||
|
||
my @objects = @ARGV; | ||
|
||
for my $object ( @objects ) { | ||
my $source = $object; | ||
|
||
$source =~ s{[.]o$}{.c} or die "Got an object that doesn't end in .o"; | ||
|
||
open( my $fh, '<', $source ) or die "Can't read $source: $!"; | ||
|
||
while ( my $line = <$fh> ) { | ||
if ( $line =~ /^\s*#include\s+"([^"]+)"/ ) { | ||
my $include_file = $1; | ||
print "$source: $include_file\n"; | ||
} | ||
} | ||
|
||
close $fh or die $!; | ||
|
||
|
||
} |