From 087b2339bd712e1f175b2e7bb689f38f1454a744 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 1 Feb 2023 00:09:27 +0100 Subject: [PATCH 1/3] Always force generation of version file --- src/utils/src/Kbuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/src/Kbuild b/src/utils/src/Kbuild index 67f84ac2e7..de73792c80 100644 --- a/src/utils/src/Kbuild +++ b/src/utils/src/Kbuild @@ -15,8 +15,8 @@ obj-y += malloc.o obj-y += version.o version-objs := version_gen.o -src/utils/src/version_gen.c: src/utils/src/version.vtpl - $(PYTHON) $(srctree)/tools/make/versionTemplate.py --crazyflie-base $(srctree) $< $@ +src/utils/src/version_gen.c: src/utils/src/version.vtpl FORCE + $(PYTHON) $(srctree)/tools/make/versionTemplate.py --crazyflie-base $(srctree) $< $@ ### From eb53340e44a06df735d97011d83c3c4fb2a18e45 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 1 Feb 2023 00:11:45 +0100 Subject: [PATCH 2/3] version_gen.c is generated in build/ --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index f2360df107..99c504bc4c 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,3 @@ build/ **/*.cmd **/*.a *.elf -src/utils/src/version_gen.c From 0235b90118b2f61434934752e5640e1ded5358ae Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 1 Feb 2023 00:13:21 +0100 Subject: [PATCH 3/3] Remove unused version mechanism --- tools/kbuild/Makefile.kbuild | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tools/kbuild/Makefile.kbuild b/tools/kbuild/Makefile.kbuild index 010ea26974..23b3622709 100644 --- a/tools/kbuild/Makefile.kbuild +++ b/tools/kbuild/Makefile.kbuild @@ -339,11 +339,9 @@ endif # Detect when mixed targets is specified, and make a second invocation # of make so .config is not included in this case either (for *config). -version_h := include/generated/version.h - no-dot-config-targets := clean mrproper distclean \ cscope help% %docs check% coccicheck \ - $(version_h) headers_% archheaders archscripts \ + headers_% archheaders archscripts \ kernelversion %src-pkg config-targets := 0 @@ -614,7 +612,7 @@ endif # prepare2 creates a makefile if using a separate output directory prepare2: prepare3 outputmakefile -prepare1: prepare2 $(version_h) include/config/auto.conf +prepare1: prepare2 include/config/auto.conf archprepare: @@ -630,16 +628,6 @@ prepare: prepare0 # KERNELRELEASE can change from a few different places, meaning version.h # needs to be updated, so this check is forced on all builds -define filechk_version.h - (echo \#define firmware_VERSION_CODE $(shell \ - expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ - echo '#define firmware_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) -endef - -$(version_h): $(srctree)/Makefile FORCE - $(call filechk,version.h) - - PHONY += headerdep headerdep: $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \