Fix -j race on libsashidown.a; cst-agent-update keeps the install prefix
This commit is contained in:
@@ -103,7 +103,7 @@ TESTS = \
|
||||
|
||||
TEST_LIBS = -lm $(CURL_LIBS) $(PTHREAD_LIBS)
|
||||
|
||||
.PHONY: all clean check demo sashidown-lib cmake-gcc cmake-clang asan install uninstall
|
||||
.PHONY: all clean check demo sashidown-lib FORCE cmake-gcc cmake-clang asan install uninstall
|
||||
|
||||
all: sashidown-lib cst-agent
|
||||
|
||||
@@ -116,9 +116,15 @@ cmake-clang:
|
||||
cmake -B build-clang -DCMAKE_C_COMPILER=clang -DCST_BUILD_TUI=ON
|
||||
cmake --build build-clang
|
||||
|
||||
sashidown-lib:
|
||||
sashidown-lib: $(SD_DIR)/libsashidown.a
|
||||
|
||||
# The sub-make decides whether the archive is stale; FORCE only makes sure it
|
||||
# is asked, and -j builds wait for it before linking.
|
||||
$(SD_DIR)/libsashidown.a: FORCE
|
||||
$(MAKE) -C $(SD_DIR) libsashidown.a
|
||||
|
||||
FORCE:
|
||||
|
||||
cst-agent: $(OBJ) $(SD_DIR)/libsashidown.a
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user