From 81ff33cffc103c184e002ccefe939efe2958a421 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Thu, 11 Jul 2019 10:44:21 -0600 Subject: Makefile: Add $(xcompile) to specify where to write xcompile This file was being written to the root src directory. It is the only file being written to src during a normal build, while all others are being written to $(obj). I added a new variable to allow specifying the xcompile path. This allows generating a single file if building multiple boards. I also moved the default location into $(obj) so we don't pollute the src directory by default. I also cleaned up the generation of xcompile by removing the unnecessary eval and NOCOMPILE check. I also left .xcompile in distclean so it cleans up stale files. Since .xcompile is written into $(obj), `make clean` will now remove it. The tegra Makefiles are outside of the normal build process, so I just updated those Makefiles to point to the default xcompile location of a normal build. The what-jenkins-does target had to be updated to support these special targets. We generate an xcompile specifically for these targets and pass it into the Makefile. Ideally we should get these targets added to the main build. BUG=b:112267918 TEST=ran `emerge-grunt coreboot` and `make what-jenkins-does` Signed-off-by: Raul E Rangel Change-Id: Ia83f234447b977efa824751c9674154b77d606b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/28101 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- util/abuild/abuild | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'util/abuild') diff --git a/util/abuild/abuild b/util/abuild/abuild index 2ba2f72d1f..408de12e7a 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -354,7 +354,6 @@ function compile_target eval "$BUILDPREFIX" "$MAKE" "$verboseopt" DOTCONFIG="${build_dir}/config.build" obj="${build_dir}" objutil="$TARGET/sharedutils" BUILD_TIMELESS=$TIMELESS \ &> "${build_dir}/make.log" ; \ MAKE_FAILED=$? - cp "${ROOT}/.xcompile" "${build_dir}/xcompile.build" cd "${build_dir}" || return $? etime=$(perl -e 'print time();' 2>/dev/null || date +%s) @@ -466,10 +465,10 @@ function build_config missing_arches="$($MAKE --no-print-directory -f - \ REQUIRED_ARCHES="$required_arches" <<'EOF' -include .xcompile +include $(xcompile) .PHONY: missing_arches missing_arches: - $(if $(XCOMPILE_COMPLETE),,$(error .xcompile is invalid.)) + $(if $(XCOMPILE_COMPLETE),,$(error $(xcompile) is invalid.)) @echo $(foreach arch,$(REQUIRED_ARCHES),$(if $(filter $(arch),$(SUBARCH_SUPPORTED)),,$(arch))) EOF )" @@ -767,7 +766,9 @@ if ! mkdir -p "$TARGET"; then exit 1 fi -$MAKE -C"${ROOT}" UPDATED_SUBMODULES=1 .xcompile || exit 1 +# Generate a single xcompile for all boards +export xcompile="${TARGET}/xcompile" +$MAKE -C"${ROOT}" UPDATED_SUBMODULES=1 "${xcompile}" || exit 1 customizing=$(echo "$customizing" | cut -c3-) if [ "$customizing" = "" ]; then -- cgit v1.2.3