summaryrefslogtreecommitdiff
path: root/samples/samples.mk
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2016-08-23 21:14:35 (GMT)
committerGitHub <noreply@github.com>2016-08-23 21:14:35 (GMT)
commit8a4870c2f8788c097d71194cb6d334cef1ae31ab (patch)
treeb891c1b351fbce138686c327ddfbd53874b61974 /samples/samples.mk
parent87eb166c5bd52b4d205fb652cc3981e0a9c12d65 (diff)
parentb7ef2697ca4ec3f5409420cb0ded852b77b84c5e (diff)
Merge pull request #383 from stilor/multilib
Multilib support
Diffstat (limited to 'samples/samples.mk')
-rw-r--r--samples/samples.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/samples/samples.mk b/samples/samples.mk
index 643e595..bf51135 100644
--- a/samples/samples.mk
+++ b/samples/samples.mk
@@ -186,6 +186,7 @@ $(CT_SAMPLES): config_files
__comma = ,
prefix_dir = $(CT_PREFIX)/$(subst $(__comma),=,$(1))
host_triplet = $(if $(findstring $(__comma),$(1)),$(firstword $(subst $(__comma), ,$(1))))
+target_triplet = $(if $(findstring $(__comma),$(1)),$(word 2,$(subst $(__comma), ,$(1))),$(1))
# Create the rule to build a sample
# $1: sample name (target tuple, or host/target tuples separated by a comma)
@@ -212,7 +213,8 @@ define build_sample
fi; \
printf '\r %-5s %s\n' $$status '$(1)'; \
mkdir -p .build-all/$$status/$(1); \
- bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2
+ bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2; \
+ [ "$$status" = PASS -a -z "$(CT_PRESERVE_PASSED_BUILDS)" ] && rm -rf .build/$(call target_triplet,$(1)) || :
endef
# ----------------------------------------------------------