From 2b0f455254149bd0c41c463a58c00d218922f002 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 13 Jan 2013 11:52:20 +0000 Subject: Makefile: export a few variables to help support scripts Support scripts (in support/) may need to parse the .config file, so give them an easy access to it, by exporting BUILDROOT_CONFIG with the fully- qualified path to .config. Also, post-build scripts may need to reference a few locations, so export those, too. Note: we export both O and BASE_DIR. Although they are the same, BASE_DIR is used internally, while O is used on the command line, which makes it a bit ambiguous to know which to use. As users use O= on the command line, they will probably tend to use that in their post-build scripts. Update doc accordingly. [Peter: fixed typo] Signed-off-by: "Yann E. MORIN" Cc: Arnout Vandecappelle Cc: Thomas Petazzoni cc: Peter Korsgaard Signed-off-by: Peter Korsgaard --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 074674a16..5a8325145 100644 --- a/Makefile +++ b/Makefile @@ -91,6 +91,8 @@ EXTRAMAKEARGS = O=$(O) NEED_WRAPPER=y endif +BUILDROOT_CONFIG=$(CONFIG_DIR)/.config + # Pull in the user's configuration file ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(CONFIG_DIR)/.config @@ -282,6 +284,15 @@ HOSTCC := $(CCACHE) $(HOSTCC) HOSTCXX := $(CCACHE) $(HOSTCXX) endif +# Scripts in support/ or post-build scripts may need to reference +# these locations, so export them so it is easier to use +export BUILDROOT_CONFIG +export TARGET_DIR +export STAGING_DIR +export HOST_DIR +export BINARIES_DIR +export BASE_DIR O # O and BASE_DIR are the same + ############################################################# # # You should probably leave this stuff alone unless you know -- cgit v1.2.3