* [Buildroot] [git commit] package/linux-tools: change method for including linux-tool sub-makefiles
@ 2017-07-19 19:16 Thomas Petazzoni
0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2017-07-19 19:16 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=b2c043b29a9de15a3f0c4be1275653adc42400c2
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Make inclusion ordering of all linux-tool-*.mk sub-makefiles explicit
instead of relying on alphabetical sort order. This is done by
renaming the Linux tools sub-makefiles to the format linux-tool-*.mk.in.
This causes the top-level Makefile to ignore the Linux tools
sub-makefiles.
Until now, the main Makefile included all linux-tool-*.mk files, as
well as linux-tools.mk, and it relied on alphabetical sorting to
include them in the proper order (linux-tool-*.mk before
linux-tools.mk).
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: improve comment in the code as suggested by Yann.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
docs/manual/adding-packages-linux-kernel-spec-infra.txt | 4 ++--
...linux-tool-cpupower.mk => linux-tool-cpupower.mk.in} | 0
.../{linux-tool-gpio.mk => linux-tool-gpio.mk.in} | 0
.../{linux-tool-iio.mk => linux-tool-iio.mk.in} | 0
.../{linux-tool-perf.mk => linux-tool-perf.mk.in} | 0
...nux-tool-selftests.mk => linux-tool-selftests.mk.in} | 0
package/linux-tools/linux-tools.mk | 17 ++++++++---------
7 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/docs/manual/adding-packages-linux-kernel-spec-infra.txt b/docs/manual/adding-packages-linux-kernel-spec-infra.txt
index 6deb6d4..b948e20 100644
--- a/docs/manual/adding-packages-linux-kernel-spec-infra.txt
+++ b/docs/manual/adding-packages-linux-kernel-spec-infra.txt
@@ -40,8 +40,8 @@ Unlike other packages, the +linux-tools+ package options appear in the
+linux+ kernel menu, under the `Linux Kernel Tools` sub-menu, not under
the `Target packages` main menu.
-Then for each linux tool, add a new +.mk+ file named
-+package/linux-tools/linux-tool-foo.mk+. It would basically look like:
+Then for each linux tool, add a new +.mk.in+ file named
++package/linux-tools/linux-tool-foo.mk.in+. It would basically look like:
------------------------------
01: ################################################################################
diff --git a/package/linux-tools/linux-tool-cpupower.mk b/package/linux-tools/linux-tool-cpupower.mk.in
similarity index 100%
rename from package/linux-tools/linux-tool-cpupower.mk
rename to package/linux-tools/linux-tool-cpupower.mk.in
diff --git a/package/linux-tools/linux-tool-gpio.mk b/package/linux-tools/linux-tool-gpio.mk.in
similarity index 100%
rename from package/linux-tools/linux-tool-gpio.mk
rename to package/linux-tools/linux-tool-gpio.mk.in
diff --git a/package/linux-tools/linux-tool-iio.mk b/package/linux-tools/linux-tool-iio.mk.in
similarity index 100%
rename from package/linux-tools/linux-tool-iio.mk
rename to package/linux-tools/linux-tool-iio.mk.in
diff --git a/package/linux-tools/linux-tool-perf.mk b/package/linux-tools/linux-tool-perf.mk.in
similarity index 100%
rename from package/linux-tools/linux-tool-perf.mk
rename to package/linux-tools/linux-tool-perf.mk.in
diff --git a/package/linux-tools/linux-tool-selftests.mk b/package/linux-tools/linux-tool-selftests.mk.in
similarity index 100%
rename from package/linux-tools/linux-tool-selftests.mk
rename to package/linux-tools/linux-tool-selftests.mk.in
diff --git a/package/linux-tools/linux-tools.mk b/package/linux-tools/linux-tools.mk
index 7fa8d19..ac4da59 100644
--- a/package/linux-tools/linux-tools.mk
+++ b/package/linux-tools/linux-tools.mk
@@ -10,15 +10,14 @@
#
# So, all tools refer to $(LINUX_DIR) instead of $(@D).
-# Note: we need individual tools .mk files to be included *before* this one
-# to guarantee that each tool has a chance to register itself before we build
-# the list of build and install hooks, below.
-#
-# This is currently guaranteed by the naming of each file:
-# - they get included by the top-level Makefile, with $(sort $(wildcard ...))
-# - make's $(sort) function will aways sort in the C locale
-# - the files names correctly sort out in the C locale so that each tool's
-# .mk file is included before this one.
+# Note: we need individual tools makefiles to be included *before* we build
+# the list of build and install hooks below to guarantee that each tool has
+# a chance to register itself once, and only once. Therefore, the makefiles
+# are named linux-tool-*.mk.in, so they won't be picked up by the top-level
+# Makefile, but can be included here, guaranteeing the single inclusion and
+# the proper ordering.
+
+include $(sort $(wildcard package/linux-tools/*.mk.in))
# We only need the kernel to be extracted, not actually built
LINUX_TOOLS_PATCH_DEPENDENCIES = linux
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-19 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 19:16 [Buildroot] [git commit] package/linux-tools: change method for including linux-tool sub-makefiles Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.