Actually, we can now throw away clean-depend.pl and make a much
simpler variant.  Its intent was to make sure that the list of
dependencies would look the same for everyone, regardless of program
used, to avoid commit wars.  That isn't necessary any more.

Something like this should suffice

sed -e 's# /\(\\.\|[^ ]\)*##g' -e '/: *$/d' -e '/^\(#.*\| *\)$/d'

Cheers,
Richard

In message <whk0jh-dyeow...@srv.efca.com> on Wed, 20 Jan 2016 23:45:01 -0800, 
"Erik Forsberg" <e...@efca.com> said:

erik> In case its not clear, the difference in the input to clean-depend.pl
erik> is that when using Solaris cc, /usr/openwin/bin/makedepend is used
erik> instead of gcc -M
erik> 
erik> Still, considering that, the problem is elsewhere, as I tried
erik> various styles of input and could not see  any correlation
erik> 
erik> >-- Original Message --
erik> >
erik> >
erik> >seems util/clean-depend.pl is now broken if using Solaris cc compiler.
erik> >Looks like its working if gcc is used, the difference seems to be that if
erik> >gcc is used the input to clean-depend.pl looks like
erik> >
erik> >object.o: dep1.h dep2.h \
erik> > dep3.h dep4.h
erik> >
erik> >if Solaris cc is used it looks like
erik> >
erik> >object.o: dep1.h
erik> >object.o: dep2.h
erik> >object.o: dep3.h
erik> >object.o: dep4.h
erik> >
erik> >I get gazillions of 'Use of uninitialized variable in ....' when running
erik> >and the net result is that all dependencies generated in the Makefile
erik> >looks like
erik> >
erik> > : ../openssl/header.h
erik> >
erik> >the make target printed before the colon is undefined.
erik> >
erik> >This block from clean-depend.pl is the faulty part (seems
erik> >to be added in 1.1, 1.0.2 was working fine)
erik> >
erik> ># Time to clean out possible system directories and normalise quirks
erik> ># from different makedepend methods
erik> >foreach $file (sort keys %files) {
erik> >    # This gets around a quirk with gcc, which removes all directory
erik> >    # information from the original file
erik> >    my $tmpfile=$file;
erik> >    $tmpfile=~s/\.o$/.c/;
erik> >    (my $origfile)=grep(/(^|\/)${tmpfile}$/,@{$files{$file}});
erik> >    my $newfile=$origfile;
erik> >    $newfile=~s/\.c$/.o/;
erik> >    if ($newfile ne $file) {
erik> >        $files{$newfile} = $files{$file};
erik> >        delete $files{$file};
erik> >        $file = $newfile;
erik> >    }
erik> >
erik> >    @{$files{$file}} =
erik> >        grep(!/^\//,
erik> >             grep(!/^$origfile$/, @{$files{$file}}));
erik> >}
erik> >
erik> >Commenting out the entire block makes it work properly
erik> >Adding a test like
erik> >if (defined $origfile) {
erik> >}
erik> >
erik> >around everything after the first grep call also fixes it
erik> >but it doesnt for example ignore system directory dependencies.
erik> >
erik> >I use latest perl 5.22 if it matters
erik> >but this looks like generic failure to me.
erik> >_______________________________________________
erik> >openssl-dev mailing list
erik> >To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
erik> 
erik> _______________________________________________
erik> openssl-dev mailing list
erik> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
erik> 
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to