aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-02-16 12:06:15 +0000
committerRon Yorston <rmy@pobox.com>2024-02-16 12:06:15 +0000
commit0200baa675d3b51c0f021da7728353ee7ceedba4 (patch)
tree2c60bea606dc2d2f0976f158de977c1babd0384a /Makefile
parenta4bb355732f2902b936368b644fa08518ecce55a (diff)
downloadbusybox-w32-0200baa675d3b51c0f021da7728353ee7ceedba4.tar.gz
busybox-w32-0200baa675d3b51c0f021da7728353ee7ceedba4.tar.bz2
busybox-w32-0200baa675d3b51c0f021da7728353ee7ceedba4.zip
build system: avoid full rebuild when EXTRAVERSION changes
The last two commits allow EXTRAVERSION to track the current state of a git repository. The build system was unable to determine which files were affected by changes to EXTRAVERSION and caused a full rebuild when it changed. Alter how the version information is passed to the code so only a handful of files need to be rebuilt when it changes.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c12b7791f..30a24f68e 100644
--- a/Makefile
+++ b/Makefile
@@ -892,7 +892,7 @@ endif
892# prepare2 creates a makefile if using a separate output directory 892# prepare2 creates a makefile if using a separate output directory
893prepare2: prepare3 outputmakefile 893prepare2: prepare3 outputmakefile
894 894
895prepare1: prepare2 include/config/MARKER 895prepare1: prepare2 include/config/MARKER include/BB_VER.h
896ifneq ($(KBUILD_MODULES),) 896ifneq ($(KBUILD_MODULES),)
897 $(Q)mkdir -p $(MODVERDIR) 897 $(Q)mkdir -p $(MODVERDIR)
898 $(Q)rm -f $(MODVERDIR)/* 898 $(Q)rm -f $(MODVERDIR)/*
@@ -956,6 +956,13 @@ define filechk_version.h
956 ) 956 )
957endef 957endef
958 958
959define filechk_BB_VER.h
960 (echo \#define BB_VER \"$(KERNELRELEASE)\";)
961endef
962
963include/BB_VER.h: $(srctree)/Makefile .config .kernelrelease FORCE
964 $(call filechk,BB_VER.h)
965
959# --------------------------------------------------------------------------- 966# ---------------------------------------------------------------------------
960 967
961PHONY += depend dep 968PHONY += depend dep
@@ -1051,6 +1058,7 @@ CLEAN_FILES += busybox$(EXEEXT) busybox_unstripped* busybox.links \
1051MRPROPER_DIRS += include/config include2 1058MRPROPER_DIRS += include/config include2
1052MRPROPER_FILES += .config .config.old include/asm .version .old_version \ 1059MRPROPER_FILES += .config .config.old include/asm .version .old_version \
1053 include/NUM_APPLETS.h \ 1060 include/NUM_APPLETS.h \
1061 include/BB_VER.h \
1054 include/common_bufsiz.h \ 1062 include/common_bufsiz.h \
1055 include/autoconf.h \ 1063 include/autoconf.h \
1056 include/bbconfigopts.h \ 1064 include/bbconfigopts.h \