From 3b72a03fe29db6037a23635639843f38450c16e5 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Tue, 26 Sep 2023 01:32:41 +0200 Subject: Build: Faster recompilation --- build_and_test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build_and_test.sh') diff --git a/build_and_test.sh b/build_and_test.sh index 46f8661..0b40374 100644 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -111,8 +111,18 @@ fi echo "" echo "Build saw" +if [ ! -f "build/saw_impl${OBJ_POSTFIX}" ] || \ + [ "source/saw/_impl.c" -nt "build/saw_impl${OBJ_POSTFIX}" ]; then + $COMPILE ${FLAGS} \ + ${FLAG_OBJ}"build/saw_impl${OBJ_POSTFIX}" \ + "source/saw/_impl.c" + if [ $? -ne 0 ]; then + exit 1 + fi +fi $COMPILE ${FLAGS} \ ${FLAG_EXE}"build/saw${EXE_POSTFIX}" \ + "build/saw_impl${OBJ_POSTFIX}" \ "source/saw/_exe.c" \ ${LINK_FLAGS} if [ $? -ne 0 ]; then -- cgit v1.2.3