How to rebuild world after changing one .c file.

SirDice

Administrator
Staff member
Administrator
Moderator
Add -DNO_CLEAN so it only rebuilds what is required to be rebuilt, instead of building everything from scratch.
 

zirias@

Developer
-DNO_CLEAN can sometimes lead to strange problems (rare, but possible).

In most cases, using meta-mode solves this issue nicely:
  • make sure you have filemon(4) (filemon.ko) loaded
  • Add WITH_META_MODE=yes to /etc/src-env.conf
Edit: you need one complete build with meta-mode enabled before you can benefit from it ;)
 

zirias@

Developer
Yeah, don't use it when newvers.sh has been changed. It'll lead to some really weird version errors.
I'd assume this is not the only thing that can go wrong with -DNO_CLEAN. Admittedly, it will work fine as a one-time solution when you really just did a trivial change :)

Still, meta-mode is designed to address the problem once and for all without any risks. There are some complaints that even with meta-mode, there are situations with unnecessary rebuilds, but it does help a lot (and definitely works in this "trivial change" situation).
 
you can build only the program / lib that the file belongs to
for most stuff cd /usr/src/bin/echo;make all install
 
Top