Incremental rebuild

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Incremental rebuild

Post by ramitbhalla »

Hi,

Just curious when trying to compile handbrake using the instruction on the website for Windows I have only 2 options:
1. When a new checkout takes place it builds handbrake and all modules
2. If try to re run it again it asks me to use the --force option in configure or delete the build directory to rebuild it and it rebuilds ALL modules

Is there some way for it only to rebuild modules that have changed (like libavformat, aac etc may not have changed)?
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

If you want to rebuild libhb and the CLI and/or GUI, just use --force, it'll work fine.

If you want to rebuild a third-party library, you need to clean it first (then rebuild with --force). Do clean a library:

Code: Select all

cd build; make <contrib_name>.xclean; cd ..
…where <contrib_name> is the name of the library as found in the contrib folder, for example:

Code: Select all

cd build; make x264.xclean; cd ..
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

actually the opposite, I DON'T want to rebuild anything except what's changed. What would be the best way do that?
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

It's fully manual. Only clean the contribs that have changed. libhb and the UIs are always rebuilt, but it takes less than 5% of the overall build time.
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

so using --force is the safest and fastest way right just to rebuild incremental changes after a svn checkout
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

Technically you can do:

Code: Select all

cd build; make
…but re-configuring with --launch --force will give you a nice display of success/fail ands the duration of the rebuild.
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

right, I'm scripting it so the script will be:

Code: Select all

svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake
cd HandBrake
./configure --cross=i686-w64-mingw32 --launch-jobs=1 --launch --force
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

Erm, never tried to update an SVN checkout with a checkout command, usually one uses svn update…
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

yeah I googled that one and I think it works after some recent svn changes, let see in the up coming changes if it works it'll show up in the builds :)
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

That being said, every time a contrib gets updated, you will have to clean it before rebuilding (else the contrib won't be rebuilt, and in case of API changes, linking may fail); as I said, it's almost fully manual.
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

Hmm, any chance you have a script that does it all?
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

Nope.
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

Okay is there a guide to which all contribs are there as part of handbrake that need to be rebuilt?
ramitbhalla
Enlightened
Posts: 103
Joined: Sat Jan 18, 2014 12:12 am

Re: Incremental rebuild

Post by ramitbhalla »

Actually what I'm doing now is deleting the build folder and then running the above configure command with the --force option. Wouldn't that work to rebuild all modules?

I'm also building ffmpeg using the ffmpeg build helpers script, that's pretty cool it automatically rebuilds all modules IF they have changed and doesn't rebuild if it hasn't. Would be cool to build a similar script for handbrake.
Deleted User 11865

Re: Incremental rebuild

Post by Deleted User 11865 »

ramitbhalla wrote:Okay is there a guide to which all contribs are there as part of handbrake that need to be rebuilt?
You have to check the SVN update log.
Post Reply