Skip to content

Commit

Permalink
kernel: prevent unnecessary rebuilding due to config_data.gz
Browse files Browse the repository at this point in the history
When IKCONFIG is built-in make oldconfig will cause the kernel to be
relinked even if .config didn't change. This happens because of a
config_data.gz dependency on .config. This patch changes the if_changed
to a filechk so that config_data.h is only rebuilt when the contents
have actually changed.

Signed-off-by: Peter Foley <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
pefoley2 authored and michal42 committed Jul 19, 2011
1 parent f210735 commit e78e8f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,10 @@ targets += config_data.gz
$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
$(call if_changed,gzip)

quiet_cmd_ikconfiggz = IKCFG $@
cmd_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;")
targets += config_data.h
$(obj)/config_data.h: $(obj)/config_data.gz FORCE
$(call if_changed,ikconfiggz)
$(call filechk,ikconfiggz)

$(obj)/time.o: $(obj)/timeconst.h

Expand Down

0 comments on commit e78e8f2

Please sign in to comment.