Page 1 of 1

FIXED: How to complete an incremental build?

Posted: 23 Jun 2009 13:16
by xyz000
If I make a small change to a source file, say I modify <vlc>/extras/contrib/src/<path>/<file.c> then what steps should I take to rebuild the vlc binary?!?

I've tried running "make" from <vlc>/extras/contrib but it claims there is nothing to make

I can get a library to rebuild if I run "make" from <vlc>/extras/contrib/<path> but then running "make" from <vlc> also claims there is nothing to make.

I'm missing something here about the source / library dependencies. Can anyone help please?

Thanks!

Re: How to complete an incremental build?

Posted: 23 Jun 2009 14:12
by xtophe
extras/contrib/* is not vlc !

It's just a mean to get the third party libraries on OS/Distros which sucks.

So the Makefile is quite simple and only see if the libs have been compiled or not.

So if you make changes you need to force the build with rm -f .libfoo && make .libfoo

Re: How to complete an incremental build?

Posted: 23 Jun 2009 15:46
by xyz000
I must apologise for still feeling like an idiot but I can't yet make your instructions works. Can you talk me through a trivial example please? Suppose I want to rebuild libmpeg2 by making a change to mpeg2dec.c. In the example below I've shown "touch" to mimic updating a source file.

Code: Select all

$ pwd /path/to/vlc-1.0.0-rc3 $ touch extras/contrib/src/libmpeg2/src/mpeg2dec.c $ find . -name libmpeg2.a ./extras/contrib/src/libmpeg2.a ./extras/contrib/src/libmpeg2/libmpeg2/.libs/libmpeg2.a $ rm -f .libmpeg2 && make .libmpeg2 make: *** No rule to make target '.libmpeg2'. Stop.
The only way I get libmpeg2 to build is:

Code: Select all

$ cd extras/contrib/src/libmpeg2 $ pwd /path/to/vlc-1.0.0-rc3/extras/contrib/src/libmpeg2 $ make [...and off it goes...]
...but I still can't get VLC's Makefile to realise the lib has been updated...

Code: Select all

$ cd ../../../.. $ pwd /path/to/vlc-1.0.0-rc3 $ make [...lots of "Nothing to be done" messages...]
What step(s) am I missing?

Re: How to complete an incremental build?

Posted: 23 Jun 2009 17:48
by RĂ©mi Denis-Courmont
If you want to incrementally build libmpeg2, then incrementally build LIBMPEG2 from its own source code, not VLC.

Re: How to complete an incremental build?

Posted: 23 Jun 2009 18:09
by xyz000
incrementally build LIBMPEG2 from its own source code
OK. That's what I tried to describe in the middle part of the previous post. I hope you don't mind if I ask one more question;

Once I've built an updated lib in extras/contrib ... how do I make the VLC Makefile(s) "see" that the lib has updated? I think what I'm trying to achieve is to update the vlccore lib by re-linking against the updated lib(s) in extras/contrib?

Re: How to complete an incremental build?

Posted: 24 Jun 2009 12:25
by xyz000
I now understand what I was doing wrong. The critical depencies are the hidden files in extras/contrib/src. The previous suggested solution was:
...you need to force the build with rm -f .libfoo && make .libfoo
When I looked at the hidden files in extras/contib/src I figured that "libfoo" has a hidden file called ".foo" rather than a hidden file called ".libfoo". So here's my example of how to incrementally build VLC based on, say, a change to libmpeg2. First rebuild the library from extras/contrib/src:

Code: Select all

$ pwd /path/to/vlc $ cd extras/contrib/src $ rm -f .mpeg2 && make
Then rebuild VLC based on the updated library:

Code: Select all

$ pwd /path/to/vlc $ make
Job done. There might be a more efficient solution but at least this works for me.