On Mon, Dec 07, 2009 at 11:19:26AM -0600, Anthony Liguori wrote: > Michael S. Tsirkin wrote: >> OK, I got the "Run make defconfig" message again. >> I think it used to be re-run automatically: why >> are we asking the user to do it manually now? >> > It's buggy. defconfig should only be needed when a new config option is > added and the old config doesn't contain it yet. > > But we get this message often when a new config option has not been > added. I suspect it has something to do with checks on accessed time > against configure and config*. We probably need to be smarter than that. > > Regards, > > Anthony Liguori
Could you tell me what is it supposed to do? Here's code with my commentary: config-all-devices.mak: $(SUBDIR_DEVICES_MAK) $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") # so there's config-all-devices.mak which includes all =y lines from SUBDIR_DEVICES_MAK. %/config-devices.mak: default-configs/%.mak # this is run if # default-configs/%.mak exists and %/config-devices.mak # is older than default-configs/%.mak $(call quiet-command,cat $< > $...@.tmp, " GEN $@") # simply cat default-configs/%.mak to a temporary file @if test -f $@ ; then \ # check whether %/config-devices.mak exists echo "WARNING: $@ out of date." ;\ echo "Run \"make defconfig\" to regenerate." ; \ rm $...@.tmp ; \ #if yes tell user to run make defconfig and remove temporary # so why generate in the first place? else \ mv $...@.tmp $@ ; \ #if no move temporary to %/config-devices.mak fi defconfig: rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) # this removes config-all-devices.mak and all SUBDIR_DEVICES_MAK Now in targets, we have include config-devices.mak So my conclusions are: - The only way to generate config-devices.mak seems to be to copy default-configs.mak - We get warning each time timestamp for default configs changes. - Annoyingly, this warning will be present when you run make defconfig itself or when you run make clean Proposal: why don't we just make %/config-devices.mak include default-configs/%.mak? No copy will be necessary. -- MST