Apache OpenOffice (AOO) Bugzilla – Issue 78837
Infering a %-target can make dmake think this target exists already
Last modified: 2013-08-07 15:34:52 UTC
I found this while chasing issue 78506. It seems that when a %-target is infered the internal representation already gets a file date assigned even though the target is not yet build. If this target is than used as a prerequisite for another target that is started later it assumes that the prerequisite exists. This is most likely to happen in parallel builds, because in a sequential build an infered target is likely to be build immediately. I don't have a reduced testcase, but it is easy to reproduce with desktop/zipintro from SRC680_m216. The attached logfile was generated with: $ rm -rf wntmsci10.pro zipintro/delzip; cd zipintro $ dmake -vcdfimrw -m -P2 If one follows dev_intro.zip one sees: ... dmake: Time stamp of [../wntmsci10.pro/bin/dev_intro.zip] is 0 ... e target 1182703364.140 last_target dmake: Infering prerequisite(s) and recipe for [../wntmsci10.pro/bin/dev/intro.zip] dmake: Trying prerequisite [../wntmsci10.pro/bin/dev_intro.zip] for [../wntmsci10.pro/bin/dev/intro.zip] ... dmake: Infering prerequisite(s) and recipe for [ALLTAR] dmake: Time stamp of [ALLTAR] is 0 dmake: Time stamp of [../wntmsci10.pro/bin/dev_intro.zip] is 1182703364 ... ... Oops!! It is not build yet and has a timestamp?! ... dmake: Time stamp of [../wntmsci10.pro/bin/dev/intro.zip] is 0 dmake: >>>> Making [../wntmsci10.pro/bin/dev/intro.zip] s target 1182703364.155 ../wntmsci10.pro/bin/dev/intro.zip dmake: Updating [../wntmsci10.pro/bin/dev/intro.zip], (1182703364 > 0) mkdir ../wntmsci10.pro/bin/dev/ cp ../wntmsci10.pro/bin/dev_intro.zip ../wntmsci10.pro/bin/dev/intro.zip Boom! This might actually be related to issue 69462.
Created attachment 46218 [details] Logfile illustrating the problem
The issue is really fixed by issue 69462. This is a testcase for this problem: - - - - SHELL*:=/bin/sh SHELLFLAGS*:=-ce %.aaa : %.bbb @echo building $@ %.bbb : @echo building $@ @sleep 1 @echo finished $@ all : aaa.aaa touch $@ @echo Done - - - - $ rm aaa.* ; touch aaa.aaa ; dmake.exe -rf makefile.mk Before the fix aaa.bbb is never build.
Committed the testcase to dmake411
@ause: Please verify that the testcase works.
testcase works
dmake 4.11 is in use now