Don't start a state restoration if it is not available.
Fortuitly discovered that $SECONDS is inherited from shell to sub-shells. Good!
1 # Build a list of all available samples
3 CT_SAMPLES = $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(filter-out %Makefile,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config)))
6 @cp "$(CT_TOP_DIR)/samples/$(@)/crosstool.config" "$(CT_TOP_DIR)/.config"
10 @echo 'Preconfigured targets:'
11 @$(CT_TOP_DIR)/scripts/showSamples.sh $(CT_SAMPLES)
15 @$(CT_TOP_DIR)/scripts/saveSample.sh