diff options
author | Alexey Neyman <stilor@att.net> | 2016-04-19 23:16:23 -0700 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2016-08-23 11:00:27 -0700 |
commit | 017ff08d6107e3b8a3c0f777d6610bc11d8b1278 (patch) | |
tree | d2328185370d00a2492030eccbf89154785235ba /samples/samples.mk | |
parent | 7d8f85e6af9c3567c93d1decf1d54b14abea8eb6 (diff) | |
download | crosstool-ng-017ff08d6107e3b8a3c0f777d6610bc11d8b1278.tar.gz crosstool-ng-017ff08d6107e3b8a3c0f777d6610bc11d8b1278.tar.bz2 crosstool-ng-017ff08d6107e3b8a3c0f777d6610bc11d8b1278.zip |
build-all: Remove successful build trees.
I am running out of space when running build-all for all samples.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'samples/samples.mk')
-rw-r--r-- | samples/samples.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/samples/samples.mk b/samples/samples.mk index 643e595d..bf51135f 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 # ---------------------------------------------------------- |