Skip to content

Commit

Permalink
lua: update to newer lua crate
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasonish authored and victorjulien committed Oct 28, 2024
1 parent 9ffb2cd commit 3a7eef8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rust/Cargo.lock.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ time = "~0.3.36"

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

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

[dev-dependencies]
test-case = "~3.3.1"
Expand Down
6 changes: 3 additions & 3 deletions rust/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ RUST_TARGET = --target $(host_triplet)
endif

all-local: Cargo.toml
mkdir -p $(abs_top_builddir)/rust/gen
if HAVE_CYGPATH
cd $(abs_top_srcdir)/rust && \
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
CARGO_TARGET_DIR="$(e_rustdir)/target" \
SURICATA_LUA_SYS_HEADER_DST="$(e_rustdir)/gen" \
$(CARGO) build $(RELEASE) \
--features "$(RUST_FEATURES)" $(RUST_TARGET)
else
cd $(abs_top_srcdir)/rust && \
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \
SURICATA_LUA_SYS_HEADER_DST="$(abs_top_builddir)/rust/gen" \
$(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \
--features "$(RUST_FEATURES)" $(RUST_TARGET)
endif
Expand All @@ -57,9 +60,6 @@ endif
$(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \
fi
$(MAKE) gen/rust-bindings.h
mkdir -p $(abs_top_builddir)/rust/gen
cp -a $(RUST_SURICATA_LIBDIR)/build/suricata-lua-sys-*/out/lua/*.h \
$(abs_top_builddir)/rust/gen/

install-library:
$(MKDIR_P) "$(DESTDIR)$(libdir)"
Expand Down

0 comments on commit 3a7eef8

Please sign in to comment.