Apache OpenOffice (AOO) Bugzilla – Issue 11604
Parallel build fails in product/util
Last modified: 2003-03-11 18:17:59 UTC
With much sweat, I finally managed to track down all the issues that stopped parallel builds in product util; patch attached. Here are the issues and how they were solved: 1. All the files in $(FILELIST) are copied into directories created in $(DIRLIST) targets. Therefore they must depend on the DESTDIR* or DIRLIST targets. +$(FILELIST) : $(DIRLIST) +$(ADDITIONALFILELIST) : $(DIRLIST) and -$(DESTDIREXAMPLESCPP)$/% : $(PRJ)$/examples$/cpp$/% +$(DESTDIREXAMPLESCPP)$/% : $(PRJ)$/examples$/cpp$/% $(DESTDIREXAMPLESCPP) -$(DESTDIREXAMPLES)$/README : $(PRJ)$/examples$/README +$(DESTDIREXAMPLES)$/README : $(PRJ)$/examples$/README $(DESTDIREXAMPLES) -$(DESTDIRIDL)$/% : $(IDLOUT)$/% +$(DESTDIRIDL)$/% : $(IDLOUT)$/% $(DESTDIRIDL) etc. 2. Now that proper dependencies are added, the targets that use $? to get the source filename fail, so use subst instead. - $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $? $(MY_TEXTCOPY_TARGETPRE) $@ + $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)$/settings$/$(@:f) $(MY_TEXTCOPY_TARGETPRE) $@ - $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $? $(MY_TEXTCOPY_TARGETPRE) $@ + $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) \ + $(subst,$(DESTDIRIDL),$(IDLOUT) $@) $(MY_TEXTCOPY_TARGETPRE) $@ - $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $? $(MY_TEXTCOPY_TARGETPRE) $@ + $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(subst,$(DESTDIRINC),$(INCOUT) $@) $(MY_TEXTCOPY_TARGETPRE) $@ etc. 3. $(DESTDIREXAMPLES) is missing from DIRLIST @@ -298,6 +298,7 @@ DIRLIST = \ $(DESTDIRXML) \ $(DESTDIRINC) \ $(DESTDIRSETTINGS) \ + $(DESTDIREXAMPLES) \ 4. There are two archives built - ODK_PART*FILE and PRODUCT*FILE. The second archive contains the contents of the first archive plus ADDITIONALFILELIST, but the additional files must not get built before the first archive is complete, so added .SEQUENTIAL to the two targets: -$(BIN)$/$(PRODUCTZIPFILE) : $(BIN)$/$(ODK_PARTZIPFILE) $(ADDITIONALFILELIST) +$(BIN)$/$(PRODUCTZIPFILE) .SEQUENTIAL : $(BIN)$/$(ODK_PARTZIPFILE) $(ADDITIONALFILELIST) -$(BIN)$/$(PRODUCTTARGZFILE) : $(BIN)$/$(ODK_PARTTARGZFILE) $(ADDITIONALFILELIST) +$(BIN)$/$(PRODUCTTARGZFILE) .SEQUENTIAL : $(BIN)$/$(ODK_PARTTARGZFILE) $(ADDITIONALFILELIST) 5. Some minor cleanups Removing targets from ALLTARGETS that are dependencies: ALLTARGETS = \ - $(MISC)$/deltree.txt \ - $(DIRLIST) \ $(FILELIST) Remove BUILD_SOSL test, since ADDITIONALFILELIST is built whatever happens: -.IF "$(BUILD_SOSL)"!="" -#for OpenOffice build additionally a complete UDK -ALLTARGETS+= \ - $(ADDITIONALFILELIST) -.ENDIF Move $(GUI)==WNT tests together: .IF "$(GUI)"=="WNT" ALLTARGETS+= \ - $(BIN)$/$(ODK_PARTZIPFILE) -.ELSE -ALLTARGETS+= \ - $(BIN)$/$(ODK_PARTTARGZFILE) -.ENDIF - [..] - -.IF "$(GUI)"=="WNT" -ALLTARGETS+= \ + $(BIN)$/$(ODK_PARTZIPFILE) \ $(BIN)$/$(PRODUCTZIPFILE) .ELSE ALLTARGETS+= \ + $(BIN)$/$(ODK_PARTTARGZFILE) \ $(BIN)$/$(PRODUCTTARGZFILE) .ENDIF Chris
Created attachment 4787 [details] Patch made from CVS product/util, branch cws_srx644_ooo20030223
from what i remember, the additional dependencies in rules (%) are simply ignored. could you check if they have any impact?
I don't understand what you mean. What do you mean by 'the additional dependencies in rules'?
in lines like $(DESTDIREXAMPLESCPP)$/% : $(PRJ)$/examples$/cpp$/% $(DESTDIREXAMPLESCPP) there is a one-to-one relation between the expressions containing % on both sides. additional expressinons on the right side like those used in regular targets are not taken into account when evaluating dependencies. but as i said, just from memory...
You're right, removing those lines did not make any difference, because I had added a $(DESTDIRS) dependency elsewhere. Hoever, I also discovered that the dependency on directories themselves caused the targets to rebuild everything every time, so I have taken that back out again, and instead added a mkdir call to each of the targets that need a directory which does not exist. This makes the output on screen longer, but now the build works in parallel and does not rebuild unless a source file is changed.
Created attachment 4811 [details] New revision of patch, removing directory dependencies
hjs->jsc: i have not idea if the next milestone will still need this. please take care.
this module is not longer needed (since 1.1)
As mentioned on the qa dev list on March 5th I will close all resolved duplicate issues. Please see this posting for details. First step in IssueZilla is unfortunately to set them to verified.
As mentioned on the qa dev list on March 5th I will close all resolved <wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.