]> granicus.if.org Git - esp-idf/commitdiff
build: remove some debug lines printed when V=0
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 13 Apr 2018 08:49:00 +0000 (16:49 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 17 Apr 2018 00:04:38 +0000 (08:04 +0800)
With V=0, build process would print â€œincluding .../Makefile.projbuild" lines, causing problems for print_flash_cmd target.
The issue was due to the way macro expansion works in make. To delay evaluation of info function until the execution of expanded block, two dollar signs are required.
Test for print_flash_cmd target added.

make/project.mk
tools/ci/test_build_system.sh

index 36cfce7205617083646c3e1e2b8a21f7e71932c3..c54c3273248c26c502e1aad1d5f08edf83e96442 100644 (file)
@@ -374,7 +374,7 @@ APP_BIN:=$(APP_ELF:.elf=.bin)
 # Include any Makefile.projbuild file letting components add
 # configuration at the project level
 define includeProjBuildMakefile
-$(if $(V),$(info including $(1)/Makefile.projbuild...))
+$(if $(V),$$(info including $(1)/Makefile.projbuild...))
 COMPONENT_PATH := $(1)
 include $(1)/Makefile.projbuild
 endef
index d83198bf46bd6888772744f7958ae3a103bd0031..28cfbd37a977cf32da8a69564568261c3d5079b3 100755 (executable)
@@ -183,6 +183,10 @@ function run_tests()
     assert_rebuilt nvs_flash/src/nvs_api.o
     assert_rebuilt freertos/xtensa_vectors.o
 
+    print_status "print_flash_cmd target should produce one line of output"
+    make
+    test $(make print_flash_cmd V=0 | wc -l | tr -d ' ') -eq 1
+
     print_status "Can include/exclude object files"
     echo "#error This file should not compile" > main/excluded_file.c
     echo "int required_global;" > main/included_file.c