raze/polymer/jfaud/processdeps.pl
terminx 7b0104e9a1 JFAud
git-svn-id: https://svn.eduke32.com/eduke32@452 1a8010ca-5511-0410-912e-c29ae57300e0
2007-01-12 22:42:19 +00:00

25 lines
515 B
Perl
Executable file

#!/usr/bin/perl -w
use strict;
my $obj = shift;
my $src = shift;
my $inc = shift;
my @srcd = ();
my @incd = ();
print("# Automatically generated by processdeps.pl\n");
while (<>) {
if (/^(\S+?)\.o:/) {
print( map " \$($src)$_", @srcd );
print( map " \$($inc)$_", @incd );
print("\n\$($obj)/$1\.\$o\E:");
@srcd = ();
@incd = ();
}
push @srcd, /$src(\/\S+)/og;
push @incd, /$inc(\/\S+)/og;
}
print( map " \$($src)$_", @srcd );
print( map " \$($inc)$_", @incd );
print("\n");