[Merge] lp:~xnox/upstart/no-multibuild into lp:upstart

Dmitrijs Ledkovs launchpad at surgut.co.uk
Sat Nov 16 13:03:26 UTC 2013


Dmitrijs Ledkovs has proposed merging lp:~xnox/upstart/no-multibuild into lp:upstart.

Requested reviews:
  Upstart Reviewers (upstart-reviewers)

For more details, see:
https://code.launchpad.net/~xnox/upstart/no-multibuild/+merge/195471

At the moment xdg.c is compiled twice:

init/Makefile.am compiles init/xdg.c -> init/xdg.o
 - used by init/init and some init/test_* binaries

util/Makefile.am compiles init/xdg.c -> util/xdg.o
 - used by util/initctl and some util/test_* binaries

When subdir-objects option to automake is enabled (which will be the default in automake 2.0),
both init/Makefile.am and util/Makefile.am will compile init/xdg.c into init/xdg.o.

That's going to be a problem, because at the moment there is conditional compilation in xdg.c, and the two xdg.o are different. With subdir-objects, it will then fail to compile either one of init/* or util/*

So, I propose to remove the conditional compilation from xdg.c, and move the definition of the two variables (user_mode and session_file) from xdg.c into conf.c. Those two variables are declared as extern in other places in init/* and have a conflicting definition in util/*.

I'm not sure what's the best practice to managing defitions of extern variables. I guess we can split them into init/init_externs.c where all externs definitions are stored, instead of being scattered around various init/*.c files. In practice, xdg.c is the only one that is common across multiple subdirs so far.
-- 
https://code.launchpad.net/~xnox/upstart/no-multibuild/+merge/195471
Your team Upstart Reviewers is requested to review the proposed merge of lp:~xnox/upstart/no-multibuild into lp:upstart.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 2473 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20131116/c41deb1d/attachment.diff>


More information about the upstart-devel mailing list