Make it possible to use gcc to generate the dependency tables.
This commit is contained in:
parent
52d160d85d
commit
87b79c3ef3
@ -11,13 +11,16 @@ while(<STDIN>) {
|
||||
|
||||
my %files;
|
||||
|
||||
my $thisfile="";
|
||||
while(<STDIN>) {
|
||||
my ($file,$deps)=/^(.*): (.*)$/;
|
||||
my ($dummy, $file,$deps)=/^((.*):)? (.*)$/;
|
||||
$thisfile=$file if defined $file;
|
||||
next if !defined $deps;
|
||||
my @deps=split ' ',$deps;
|
||||
@deps=grep(!/^\/usr\/include/,@deps);
|
||||
@deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps);
|
||||
push @{$files{$file}},@deps;
|
||||
@deps=grep(!/^\\$/,@deps);
|
||||
push @{$files{$thisfile}},@deps;
|
||||
}
|
||||
|
||||
my $file;
|
||||
|
15
util/domd
15
util/domd
@ -4,8 +4,19 @@
|
||||
|
||||
TOP=$1
|
||||
shift
|
||||
MAKEDEPEND=$1
|
||||
shift
|
||||
if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
|
||||
|
||||
cp Makefile.ssl Makefile.save
|
||||
makedepend -f Makefile.ssl $@
|
||||
perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new
|
||||
if [ "$MAKEDEPEND" = "gcc" ]; then
|
||||
sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp
|
||||
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
|
||||
gcc -M $@ >> Makefile.tmp
|
||||
perl $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
|
||||
#cat Makefile.tmp > Makefile.new
|
||||
else
|
||||
${MAKEDEPEND} -f Makefile.ssl $@
|
||||
perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new
|
||||
fi
|
||||
mv Makefile.new Makefile.ssl
|
||||
|
Loading…
x
Reference in New Issue
Block a user