How to rebuild world after changing one .c file.

Alain De Vos

Daemon

Reaction score: 613
Messages: 2,071

I changed one .c file in /usr/src and want to rebuild world but this seem to take ages ...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,019
Messages: 38,467

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

Zirias

Daemon

Reaction score: 1,413
Messages: 2,467

-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 ;)
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,019
Messages: 38,467

-DNO_CLEAN can sometimes lead to strange problems (rare, but possible).
Yeah, don't use it when newvers.sh has been changed. It'll lead to some really weird version errors.
 

Zirias

Daemon

Reaction score: 1,413
Messages: 2,467

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).
 

covacat

Well-Known Member

Reaction score: 198
Messages: 423

you can build only the program / lib that the file belongs to
for most stuff cd /usr/src/bin/echo;make all install
 
Top