diff options
author | Ron Yorston <rmy@pobox.com> | 2024-02-16 12:06:15 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-02-16 12:06:15 +0000 |
commit | 0200baa675d3b51c0f021da7728353ee7ceedba4 (patch) | |
tree | 2c60bea606dc2d2f0976f158de977c1babd0384a /Makefile | |
parent | a4bb355732f2902b936368b644fa08518ecce55a (diff) | |
download | busybox-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-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |
893 | prepare2: prepare3 outputmakefile | 893 | prepare2: prepare3 outputmakefile |
894 | 894 | ||
895 | prepare1: prepare2 include/config/MARKER | 895 | prepare1: prepare2 include/config/MARKER include/BB_VER.h |
896 | ifneq ($(KBUILD_MODULES),) | 896 | ifneq ($(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 | ) |
957 | endef | 957 | endef |
958 | 958 | ||
959 | define filechk_BB_VER.h | ||
960 | (echo \#define BB_VER \"$(KERNELRELEASE)\";) | ||
961 | endef | ||
962 | |||
963 | include/BB_VER.h: $(srctree)/Makefile .config .kernelrelease FORCE | ||
964 | $(call filechk,BB_VER.h) | ||
965 | |||
959 | # --------------------------------------------------------------------------- | 966 | # --------------------------------------------------------------------------- |
960 | 967 | ||
961 | PHONY += depend dep | 968 | PHONY += depend dep |
@@ -1051,6 +1058,7 @@ CLEAN_FILES += busybox$(EXEEXT) busybox_unstripped* busybox.links \ | |||
1051 | MRPROPER_DIRS += include/config include2 | 1058 | MRPROPER_DIRS += include/config include2 |
1052 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ | 1059 | MRPROPER_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 \ |