aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2022-04-15 08:45:54 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2022-04-23 07:40:45 +0000
commit7fb087ab6ed9ab8aa6e888c2ef77314cd057a631 (patch)
treed570ccee60eafcfda7d26406c3f61a99d887e5a0
parentd00e32651ac5da85b4653861c138b8a1573684dd (diff)
downloadports-7fb087ab6ed9ab8aa6e888c2ef77314cd057a631.tar.gz
ports-7fb087ab6ed9ab8aa6e888c2ef77314cd057a631.zip
Uses/cargo: Try to simplify cargo-crates-merge usage
Always start with a clean work directory state and end with one too. Automatically run makesum too.
-rw-r--r--Mk/Uses/cargo.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 0e31eef26778..ed6d2c8cfc42 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -391,13 +391,15 @@ cargo-crates-licenses: configure
# cargo-crates-merge will in-place update CARGO_CRATES in the port
# based on the crates list from Cargo.lock. If there is no Cargo.lock
# for some reason, try and generate it first.
-cargo-crates-merge: cargo-crates-generate-lockfile
+cargo-crates-merge:
@if ! type portedit > /dev/null 2>&1; then \
${ECHO_MSG} "===> Please install \"ports-mgmt/portfmt\""; exit 1; \
fi
+ @${MAKE} clean cargo-crates-generate-lockfile
@f="${MASTERDIR}/Makefile"; [ -r "${MASTERDIR}/Makefile.crates" ] && f="${MASTERDIR}/Makefile.crates"; \
${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | \
portedit merge -i $$f; \
- ${ECHO_MSG} "CARGO_CRATES in $$f was updated"
+ ${MAKE} clean makesum; \
+ ${ECHO_MSG} "${DISTINFO_FILE} and CARGO_CRATES in $$f were updated";
.endif