[Unstable][PATCH 1/4] UBUNTU: [Packaging] rules: Fold config check into stamp-prepare-% target
Juerg Haefliger
juerg.haefliger at canonical.com
Mon Dec 16 13:11:00 UTC 2024
We currently have a phony target config-prepare-check-% that does nothing
other than checking the generated configs against the annotations file.
With a dependency chain like:
stamps/stamp-prepare-% <- config-prepare-check-% <- stamps/stamp-prepare-tree-%
We don't need nor use that phony target, it only adds unnecessary
complexity. Just run the check after the config is generated and get rid
of two targets.
Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 12 ++++++------
debian/rules.d/4-checks.mk | 8 --------
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 5d487de0df91..ed1c28ab3823 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -7,12 +7,8 @@ shlibdeps_opts = $(if $(CROSS_COMPILE),-- -l$(CROSS_COMPILE:%-=/usr/%)/lib)
debian/scripts/fix-filenames: debian/scripts/fix-filenames.c
$(HOSTCC) $^ -o $@
-$(stampdir)/stamp-prepare-%: config-prepare-check-%
- @echo Debug: $@
- $(stamp)
-
-$(stampdir)/stamp-prepare-tree-%: target_flavour = $*
-$(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames
+$(stampdir)/stamp-prepare-%: target_flavour = $*
+$(stampdir)/stamp-prepare-%: debian/scripts/fix-filenames
@echo Debug: $@
install -d $(builddir)/build-$*
touch $(builddir)/build-$*/ubuntu-build
@@ -21,6 +17,10 @@ $(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
$(kmake) O=$(builddir)/build-$* $(conc_level) rustavailable || true
$(kmake) O=$(builddir)/build-$* $(conc_level) olddefconfig
+ifneq ($(do_skip_checks),true)
+ python3 debian/scripts/misc/annotations -f $(CURDIR)/$(DEBIAN)/config/annotations \
+ --arch $(arch) --flavour $* --check $(builddir)/build-$*/.config
+endif
$(stamp)
# Used by developers as a shortcut to prepare a tree for compilation.
diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
index 9c840af3698e..a2f0af1f9a21 100644
--- a/debian/rules.d/4-checks.mk
+++ b/debian/rules.d/4-checks.mk
@@ -8,11 +8,3 @@ module-signature-check-%: $(stampdir)/stamp-install-%
checks-%: module-signature-check-%
@echo Debug: $@
-
-# Check the config against the known options list.
-config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
- @echo Debug: $@
-ifneq ($(do_skip_checks),true)
- python3 debian/scripts/misc/annotations -f $(commonconfdir)/annotations \
- --arch $(arch) --flavour $* --check $(builddir)/build-$*/.config
-endif
--
2.43.0
More information about the kernel-team
mailing list