aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-03-31 11:05:51 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-03-31 20:52:52 +0200
commit2765973e01b386131d9f2ebb8a89a403a381d5e7 (patch)
tree73c6aaef0ff941ac7e0b1fce2c17b4536eeaad67 /Makefile
parent7e9870ce32d6329d9e3d602247fbe1709a2275a4 (diff)
downloadbuildroot-2765973e01b386131d9f2ebb8a89a403a381d5e7.tar.gz
buildroot-2765973e01b386131d9f2ebb8a89a403a381d5e7.tar.bz2
fs: set per-rootfs variable name
Like we do for packages with the PKG variable, set ROOTFS to contain the upper-case name of the rootfs currently being generated. This will be useful in later patches, when we need more per-rootfs variables, like a per-rootfs TARGET_DIR for example. In Makefiles, per-rule variables trickle down the dependency chain, to all dependencies of that rule, so we have to stop ROOTFS as soon as we're not in a rootfs. This means we have to stop it at target-finalize (which is a dependency of all filesystems), and for each package individually, since some packages (host or target) can be direct dependencies of filesystems as well. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6eca3c9ec6..6cfe83072e 100644
--- a/Makefile
+++ b/Makefile
@@ -677,6 +677,9 @@ endif
$(TARGETS_ROOTFS): target-finalize
+# Avoid the rootfs name leaking down the dependency chain
+target-finalize: ROOTFS=
+
.PHONY: target-finalize
target-finalize: $(PACKAGES)
@$(call MESSAGE,"Finalizing target directory")