Skip to content

Commit 2bef7e0

Browse files
committed
Update native modules when Rust sources change
1 parent 046a672 commit 2bef7e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ CARGO_FLAGS = $(and $(PROFILE:debug=),--$(PROFILE))
1313
.PHONY: lua_lib
1414
lua_lib: target-lua/$(PROFILE)/libvim_commonmark.so
1515

16-
target-lua/$(PROFILE)/libvim_commonmark.so:
16+
RUST_SOURCES = Cargo.lock $(wildcard src/*.rs)
17+
18+
target-lua/$(PROFILE)/libvim_commonmark.so: $(RUST_SOURCES)
1719
export LUA_INC=/usr/include/luajit-2.0/
1820
export LUA_LIB=/usr/lib LUA_LIB_NAME=luajit-5.1
1921
export LUA_LINK=dynamic
@@ -22,7 +24,7 @@ target-lua/$(PROFILE)/libvim_commonmark.so:
2224
.PHONY: python_lib
2325
python_lib: target-python/$(PROFILE)/libvim_commonmark.so
2426

25-
target-python/$(PROFILE)/libvim_commonmark.so:
27+
target-python/$(PROFILE)/libvim_commonmark.so: $(RUST_SOURCES)
2628
cargo build --no-default-features --features python --target-dir target-python $(CARGO_FLAGS)
2729

2830
.PHONY: links

0 commit comments

Comments
 (0)