]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: always update Cargo.lock.in
authorJason Ish <jason.ish@oisf.net>
Thu, 10 Apr 2025 15:12:35 +0000 (09:12 -0600)
committerVictor Julien <victor@inliniac.net>
Sat, 12 Apr 2025 09:00:03 +0000 (11:00 +0200)
On a normal project where the Cargo.lock is checked in, it would be
normal to see an updated Cargo.lock in git status and the like. As we
use autoconf to generate this file, we should just copy it back to the
input file so we get the same convenience of seeing when it is
updated, which usually means it needs to be checked in.

However, to satisfy "make distcheck", only copy it if the input
template exists, if the input template does not exist we are in an out
of tree build.

rust/Makefile.am

index fc90140bd736124563c2e4d043cd8f5dbfe97fd4..9a9828c34660a41aab1bea7867fa5348d8e6e9f8 100644 (file)
@@ -74,6 +74,9 @@ all-local: Cargo.toml
        fi
        $(MAKE) gen/rust-bindings.h
        $(MAKE) gen/htp/htp_rs.h
+       if test -e Cargo.lock.in; then \
+               cp Cargo.lock Cargo.lock.in; \
+       fi
 
 install-exec-local:
        install -d -m 0755 "$(DESTDIR)$(bindir)"