Hi Peter, thanks for the invaluable feedback. On 02/07/2012 10:05 PM, Peter Rosin wrote: > Stefano Lattarini skrev 2012-02-05 14:16: > >> So, what about the attached patch, that overhauls (and hopefully improve) >> the coverage for automatic dependency tracking support? It is probably >> possible to improve the patch even more (esp. w.r.t. optimizations for >> speed), but that can be left for follow-up changes IMHO. >> >> I will push (to master) in 72 hours if there is no objection by then. > > Hi Stefano, > > This looks promising! > > Appart from the below inline nitpicking, your method to force a depmode > doesn't really seem to work, possibly only when you also force another > compiler, as shown by the below grep (after a non-libtool run with > CC="cl- nologo"). > Ouch (but then I see you found out and reported the reason for this below -- thanks!).
> Over to the nitpicking part... > > [SNIP well-spotted nitpicks] > Consider all of those fixed. Thanks. >> diff --git a/tests/depcomp.sh b/tests/depcomp.sh >> new file mode 100755 >> index 0000000..147e8ca >> --- /dev/null >> +++ b/tests/depcomp.sh >> @@ -0,0 +1,378 @@ > > *snip* > >> +case $depmode in >> + auto) >> + cfg_deptrack=--enable-dependency-tracking ;; >> + disabled) >> + cfg_deptrack=--disable-dependency-tracking ;; >> + *) >> + # Sanity check: ensure the cache variable we force is truly >> + # used by configure. >> + $FGREP $cachevar configure \ >> + || fatal_ "configure lacks required cache variable '$cachevar'" >> + cfg_deptrack="cachevar=$depmode" ;; > > Here's the reason for failing to force the depmode, possibly. > > It works better with $cachevar > Well spotted! (and I feel like a moron now). To make amend, I've squashed the diff below into 'depmod.sh' (this would have caught the blunder right away). @@ -262,12 +262,15 @@ test -f build-aux/depcomp \ case $depmode in auto) + displayed_depmode='.*' cfg_deptrack=--enable-dependency-tracking ;; disabled) + displayed_depmode=none cfg_deptrack=--disable-dependency-tracking ;; *) # Sanity check: ensure the cache variable we force is truly # used by configure. $FGREP $cachevar configure \ || fatal_ "configure lacks required cache variable '$cachevar'" + displayed_depmode="(cached) $depmode" cfg_deptrack="cachevar=$depmode" ;; @@ -318,7 +321,15 @@ do_test () ;; esac - command_ok_ "$pfx configure" "$srcdir"/configure $cfg_deptrack ${1+"$@"} + command_ok_ \ + "$pfx configure" \ + "$srcdir/configure" $cfg_deptrack ${1+"$@"} >stdout + cat stdout + + command_ok_ \ + "$pfx right depmode selected" \ + grep "^checking dependency style .*\.\.\. $displayed_depmode$" stdout + command_ok_ "$pfx simple make" make_ok # Some bugs in VPATH builds only kick in during a rebuild. command_ok_ "$pfx clean & rebuild" eval '$MAKE clean && make_ok' I will push the patch by tomorrow, barring objections. Thanks, Stefano