Source: u-boot Severity: wishlist Tags: patch Hello. Here is one more cosmetic suggestion…
From: Nicolas Boulenguez <nico...@debian.org> Subject: [PATCH] [debian/rules] Make more settings explicit in build logs Append Debian revision to UBOOTVERSION via the command line instead of a patch. Set HOSTCFLAGS via the command line instead of the environment. Improve separation of concerns in debian/rules with a common_make_args variable. --- a/debian/patches/add-debian-revision-to-u-boot-version +++ /dev/null @@ -1,14 +0,0 @@ -Add the debian revision to the U-boot version, which is displayed at -boot and can be helpful to determine which specific version is used. - ---- a/Makefile -+++ b/Makefile -@@ -447,7 +447,7 @@ - - # Read UBOOTRELEASE from include/config/uboot.release (if it exists) - UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null) --UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -+UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)$(DEBIAN_REVISION) - - export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION - export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ -add-debian-revision-to-u-boot-version - tools-generic-builds.patch mx53loco --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,13 @@ include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/pkg-info.mk -export DEBIAN_REVISION ?= $(shell echo $(DEB_VERSION) | sed -e 's,.*+dfsg,+dfsg,') + +# Add the debian revision to the U-boot version, which is displayed at +# boot and can be helpful to determine which specific version is used. +original_EXTRAVERSION = $(shell sed -n '/^EXTRAVERSION = /{s///p;q}' Makefile) +DEBIAN_REVISION ?= $(shell echo $(DEB_VERSION) | sed -e 's,.*+dfsg,+dfsg,') +EXTRAVERSION = $(original_EXTRAVERSION)$(DEBIAN_REVISION) +common_make_args += EXTRAVERSION='$(EXTRAVERSION)' include debian/targets.mk @@ -17,6 +23,7 @@ VERBOSE=0 else VERBOSE=1 endif +common_make_args += V=$(VERBOSE) # the upstream build passes LDFLAGS directly to ld instead of calling gcc for # linking; so instead of passing -Wl,foo in LDFLAGS as in automake builds, one @@ -50,7 +57,8 @@ ifneq (,$(only_platforms)) endif # Enable debugging symbols and remove build paths -export HOSTCFLAGS = -g -ffile-prefix-map=$(CURDIR)=. +HOSTCFLAGS = -g -ffile-prefix-map=$(CURDIR)=. +common_make_args += HOSTCFLAGS='$(HOSTCFLAGS)' %: dh $@ @@ -76,12 +84,14 @@ define build_template # debian/rules: building platform: $(platform) mkdir -p debian/build/$(platform) - dh_auto_build -- V=$(VERBOSE) O=debian/build/$(platform) \ + dh_auto_build -- $(common_make_args) \ + O=debian/build/$(platform) \ CROSS_COMPILE=$(or $($(platform)_CROSS_COMPILE),$(CROSS_COMPILE)) \ $($(package)_assigns) $($(platform)_assigns) \ $(platform)_defconfig sed -i 's,CONFIG_FIT_SIGNATURE=y,# CONFIG_FIT_SIGNATURE is not set,' debian/build/$(platform)/.config - dh_auto_build -- V=$(VERBOSE) O=debian/build/$(platform) \ + dh_auto_build -- $(common_make_args) \ + O=debian/build/$(platform) \ CROSS_COMPILE=$(or $($(platform)_CROSS_COMPILE),$(CROSS_COMPILE)) \ $($(package)_assigns) $($(platform)_assigns) @@ -106,10 +116,14 @@ $(foreach package, u-boot-qemu $(subarchs),\ TOOLSDIR := debian/build/tools build-tools: - dh_auto_build -- V=$(VERBOSE) O=$(TOOLSDIR) CROSS_COMPILE=$(CROSS_COMPILE) tools-only_defconfig + dh_auto_build -- $(common_make_args) \ + O=$(TOOLSDIR) \ + CROSS_COMPILE=$(CROSS_COMPILE) \ + tools-only_defconfig cp $(TOOLSDIR)/.config $(TOOLSDIR)/config # board-independent tools - dh_auto_build -- V=$(VERBOSE) O=$(TOOLSDIR) \ + dh_auto_build -- $(common_make_args) \ + O=$(TOOLSDIR) \ CROSS_COMPILE=$(CROSS_COMPILE) \ CROSS_BUILD_TOOLS=$(cross_build_tools) \ NO_SDL=1 \