On Sat, 16 Apr 2011 16:45:33 +0200, Francis Moreau said: > For example, user did: > $ make CC=distcc > then call my script: > $ my-script > which in its turn does: > $ make > then the whole kernel is rebuilt.. You have two choices then: 1) Allow them to pass stuff to your script: $ make CC=distcc then call my script: $ my-script CC=distcc which in its turn does: $ make "$*" 2) Find out *why* they're doing a make of the kernel, and then calling your script that *again* does a make of the kernel, instead of just calling your script and being done with it. This sounds like you have a poorly designed build environment, and *that* needs fixing instead of kbuild. There's really an upper limit to how much kbuild is able to help a 3rd-party script writer who has users who can't follow directions. There's just too many ways they can do things that will cause a rebuild - they can do a make, then run a 'make menuconfig' and change some important setting, then call your script and wham you end up rebuilding the kernel anyhow.