Stop multiple file GCC compilation when one of them fails
问题 I have created the following bash build script file : BLD_INCLUDE="-I..source/module1 -I..source/module2" SRC_MOD1="$(find ../source/module1 -name '*.c')" SRC_MOD2="$(find ../source/module2 -name '*.c')" BLD_SOURCES="../source/program.c $SRC_MOD1 $SRC_MOD2" BLD_LINKER="" #if there is any need of linker - irrelevant here gcc $BLD_FLAGS $BLD_INCLUDE -o outputobject $BLD_SOURCES $BLD_LINKER I am building like this because there are lot of files I need to compile. The problem is, when executing