diff options
-rwxr-xr-x | util/clean-depend.pl | 7 | ||||
-rwxr-xr-x | util/domd | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/util/clean-depend.pl b/util/clean-depend.pl index af676af751..c37d98521c 100755 --- a/util/clean-depend.pl +++ b/util/clean-depend.pl @@ -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; @@ -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 |