Bug 59708

Summary: build system ignores "make mod1 mod2" ignores dependencies between mod1 and mod2
Product: LibreOffice Reporter: Lionel Elie Mamane <lionel>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WONTFIX    
Severity: normal CC: bjoern.michaelsen, dtardon, fridrich.strba, michael.stahl
Priority: medium    
Version: 4.0.0.1 rc   
Hardware: All   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description Lionel Elie Mamane 2013-01-22 10:56:00 UTC
Observed behaviour:

$ touch dbaccess/source/ui/querydesign/queryview.cxx 
$ touch connectivity/source/drivers/dbase/DTable.cxx 
$ make dbaccess connectivity
make -r -f /PWD/Makefile.top dbaccess connectivity
make[1]: Entering directory `/PWD'
cd dbaccess && make -j 4 -rs gb_PARTIALBUILD=T
[build DEP] LNK:Library/libdbulo.so
make[2]: Entering directory `/PWD/dbaccess'
[build DEP] LNK:Library/libdbalo.so
make[2]: Leaving directory `/PWD/dbaccess'
^Cmake[1]: *** [dbaccess] Interrupt
make: *** [dbaccess] Interrupt

$ grep connectivity dbaccess/prj/build.lst 
ba      dbaccess        :       BOOST:boost connectivity svx stoc QADEVOOO:qadevOOo xmlscript LIBXSLT:libxslt test NULL



Expected behaviour:

$ touch dbaccess/source/ui/querydesign/queryview.cxx 
$ touch connectivity/source/drivers/dbase/DTable.cxx 
$ make dbaccess connectivity
make -r -f /PWD/Makefile.top dbaccess connectivity
make[1]: Entering directory `/PWD'
cd connectivity && make -j 4 -rs gb_PARTIALBUILD=T



That is, detect that dbaccess depends on connectivity and rebuild connectivity *before* dbaccess. The dependency is there and declared and all that, so theoretically it should be possible. (Maybe make it an order-only dependency so that "make dbaccess" does not automatically rebuild connectivity?)
Comment 1 David Tardon 2013-01-22 13:40:31 UTC
These inter-module dependencies are a part of the old build system and are increasingly less useful. What you do want is "make dbaccess.all" (you can add connectivity.all too, if you are not sure which is "higher" up the dependency stack. The second build will just do nothing.) Also note that this did not work in the old build system either--one had to call "build --all" in dbaccess, not just plain "build".
Comment 2 Lionel Elie Mamane 2013-01-22 13:53:57 UTC
(In reply to comment #1)
> What you do want is "make dbaccess.all"

This goes into tail_build, which takes a *loooong* time to decide what to do, exactly what I want to avoid. When I know that I've only changed stuff in dbaccess and connectivity, ... it would be nice to be able to somehow have correct inter-module dependencies, but limited to just these two?

Also, it would rebuild *all* modules that dbaccess uses, not only connectivity, right?
Comment 3 Michael Stahl (allotropia) 2013-01-22 14:04:30 UTC
hmmm... this is a bit sub-optimal but i guess getting this to work as you want it would not be a trivial effort; gbuild does not use the build.lst files that express the inter-module dependencies.

my opinion is that if you build individual modules then you should know that that's a shortcut that doesn't always work (think of ABI changes), and that you need to think about doing things in the right order, so the current situation appears "good enough" to me.