Skip to content

Commit 33fc09c

Browse files
committed
fix lib makefile to work in npm package where there is no source folder
1 parent 47204f4 commit 33fc09c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/lib/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ $(info $(shell mkdir -p out))
2525
default: pre-build twrlibex.js testex.wasm testex-a.wasm
2626

2727
pre-build:
28-
$(MAKE) -C ../../source/
29-
28+
@if [ -d "../../source/" ]; then \
29+
$(MAKE) -C ../../source/; \
30+
else \
31+
echo "Source Directory does not exist. Skipping source build step."; \
32+
fi
33+
3034
twrlibex.js: index.html twrlibex.ts
3135
tsc
3236

0 commit comments

Comments
 (0)