From aa48e0a8f4311d01dc09e448f9ebbcff2f4b4b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=CE=9Brd?= Date: Tue, 14 Sep 2021 17:46:13 -0400 Subject: [PATCH] fix: do not execute build on ctest if not needed (#20) --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9dc2191..3156a9e 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ $(STATUSGO): | deps + cd vendor/status-go && \ $(MAKE) statusgo-shared-library $(HANDLE_OUTPUT) +LIBSTATUSLIB := build/$@.$(LIBSTATUS_EXT).0 libstatuslib: | $(STATUSGO) echo -e $(BUILD_MSG) "$@" && \ $(ENV_SCRIPT) nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) --passL:"-L$(STATUSGO_LIBDIR)" --passL:"-lstatus" -o:build/$@.$(LIBSTATUS_EXT).0 -d:ssl --app:lib --noMain --header --nimcache:nimcache/libstatuslib statuslib.nim && \ @@ -115,7 +116,7 @@ libstatuslib: | $(STATUSGO) # libraries for dynamic linking of non-Nim objects EXTRA_LIBS_DYNAMIC := -L"$(CURDIR)/build" -lstatuslib -lm -L"$(STATUSGO_LIBDIR)" -lstatus -build_ctest: | libstatuslib build deps +build_ctest: | $(LIBSTATUSLIB) build deps echo -e $(BUILD_MSG) "build/ctest" && \ $(CC) test/main.c -Wl,-rpath,'$$ORIGIN' -I./vendor/nimbus-build-system/vendor/Nim/lib $(EXTRA_LIBS_DYNAMIC) -g -o build/ctest