Skip to content

Commit dcd5210

Browse files
committed
Create output dir outside targets
1 parent d30588d commit dcd5210

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ ERLANG_INCLUDES := $(shell erl -eval 'io:format("~s", \
88
LIBP2P_DIR = native/libp2p_nif
99
OUTPUT_DIR = priv/native
1010

11-
# create dir if it doesn't exist
12-
dir_guard=@mkdir -p $(@D)
11+
# create directories if they don't exist
12+
DIRS=$(OUTPUT_DIR)
13+
$(info $(shell mkdir -p $(DIRS)))
1314

1415
GO_SOURCES = $(LIBP2P_DIR)/main.go
1516
GO_ARCHIVES := $(patsubst %.go,%.a,$(GO_SOURCES))
@@ -25,7 +26,6 @@ $(LIBP2P_DIR)/%.a $(LIBP2P_DIR)/%.h: $(LIBP2P_DIR)/%.go
2526
go build -buildmode=c-archive -tags only_go $*.go
2627

2728
$(OUTPUT_DIR)/libp2p_nif.so: $(GO_ARCHIVES) $(GO_HEADERS) $(LIBP2P_DIR)/libp2p.c $(LIBP2P_DIR)/utils.c
28-
$(dir_guard)
2929
gcc $(CFLAGS) -o $@ \
3030
$(LIBP2P_DIR)/libp2p.c $(LIBP2P_DIR)/utils.c $(GO_ARCHIVES)
3131

0 commit comments

Comments
 (0)