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 %files;
|
||||||
|
|
||||||
|
my $thisfile="";
|
||||||
while(<STDIN>) {
|
while(<STDIN>) {
|
||||||
my ($file,$deps)=/^(.*): (.*)$/;
|
my ($dummy, $file,$deps)=/^((.*):)? (.*)$/;
|
||||||
|
$thisfile=$file if defined $file;
|
||||||
next if !defined $deps;
|
next if !defined $deps;
|
||||||
my @deps=split ' ',$deps;
|
my @deps=split ' ',$deps;
|
||||||
@deps=grep(!/^\/usr\/include/,@deps);
|
@deps=grep(!/^\/usr\/include/,@deps);
|
||||||
@deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps);
|
@deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps);
|
||||||
push @{$files{$file}},@deps;
|
@deps=grep(!/^\\$/,@deps);
|
||||||
|
push @{$files{$thisfile}},@deps;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $file;
|
my $file;
|
||||||
|
13
util/domd
13
util/domd
@ -4,8 +4,19 @@
|
|||||||
|
|
||||||
TOP=$1
|
TOP=$1
|
||||||
shift
|
shift
|
||||||
|
MAKEDEPEND=$1
|
||||||
|
shift
|
||||||
|
if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
|
||||||
|
|
||||||
cp Makefile.ssl Makefile.save
|
cp Makefile.ssl Makefile.save
|
||||||
makedepend -f Makefile.ssl $@
|
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
|
perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new
|
||||||
|
fi
|
||||||
mv Makefile.new Makefile.ssl
|
mv Makefile.new Makefile.ssl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user