Skip to content

Commit 8a24807

Browse files
committed
lua: update to newer lua crate
This crate lets us instruct it where to copy the header files instead of our Makefile trying to find the correct ones and copying them into place. Can prevent the simultaneous copy errors sometimes seen on a make without a clean.
1 parent 89aa525 commit 8a24807

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

rust/Cargo.lock.in

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ time = "~0.3.36"
6767

6868
suricata-derive = { path = "./derive", version = "@PACKAGE_VERSION@" }
6969

70-
suricata-lua-sys = { version = "0.1.0-alpha.1" }
70+
suricata-lua-sys = { version = "0.1.0-alpha.3" }
7171

7272
[dev-dependencies]
7373
test-case = "~3.3.1"

rust/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@ RUST_TARGET = --target $(host_triplet)
3535
endif
3636

3737
all-local: Cargo.toml
38+
mkdir -p $(abs_top_builddir)/rust/gen
3839
if HAVE_CYGPATH
3940
cd $(abs_top_srcdir)/rust && \
4041
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
4142
CARGO_TARGET_DIR="$(e_rustdir)/target" \
43+
SURICATA_LUA_SYS_HEADER_DST="$(e_rustdir)/gen" \
4244
$(CARGO) build $(RELEASE) \
4345
--features "$(RUST_FEATURES)" $(RUST_TARGET)
4446
else
4547
cd $(abs_top_srcdir)/rust && \
4648
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
4749
CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \
50+
SURICATA_LUA_SYS_HEADER_DST="$(abs_top_builddir)/rust/gen" \
4851
$(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \
4952
--features "$(RUST_FEATURES)" $(RUST_TARGET)
5053
endif
@@ -57,9 +60,6 @@ endif
5760
$(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \
5861
fi
5962
$(MAKE) gen/rust-bindings.h
60-
mkdir -p $(abs_top_builddir)/rust/gen
61-
cp -a $(RUST_SURICATA_LIBDIR)/build/suricata-lua-sys-*/out/lua/*.h \
62-
$(abs_top_builddir)/rust/gen/
6363

6464
install-library:
6565
$(MKDIR_P) "$(DESTDIR)$(libdir)"

0 commit comments

Comments
 (0)