Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/cargo.mk
Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | @${CARGO_CARGO_RUN} test \ | ||||
--verbose \ | --verbose \ | ||||
${CARGO_TEST_ARGS} | ${CARGO_TEST_ARGS} | ||||
.endif | .endif | ||||
# | # | ||||
# Helper targets for port maintainers | # Helper targets for port maintainers | ||||
# | # | ||||
# cargo-crates will output the crates list from Cargo.lock. | # cargo-crates will output the crates list from Cargo.lock. If there | ||||
# is no Cargo.lock for some reason, try and generate it first. | |||||
cargo-crates: extract | cargo-crates: extract | ||||
@if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ | |||||
${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ | |||||
${CARGO_CARGO_RUN} generate-lockfile \ | |||||
--manifest-path ${CARGO_CARGOTOML} \ | |||||
--verbose; \ | |||||
fi | |||||
@${SETENV} USE_GITHUB=${USE_GITHUB} \ | @${SETENV} USE_GITHUB=${USE_GITHUB} \ | ||||
${AWK} -f ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | ${AWK} -f ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | ||||
# cargo-crates-licenses will try to grab license information from | # cargo-crates-licenses will try to grab license information from | ||||
# all downloaded crates. | # all downloaded crates. | ||||
cargo-crates-licenses: configure | cargo-crates-licenses: configure | ||||
@${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ | @${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ | ||||
-exec ${GREP} -H '^license' {} \; \ | -exec ${GREP} -H '^license' {} \; \ | ||||
| ${SED} \ | | ${SED} \ | ||||
-e 's@^${CARGO_VENDOR_DIR}/@@' \ | -e 's@^${CARGO_VENDOR_DIR}/@@' \ | ||||
-e 's@/Cargo.toml:license.*= *"@|@' \ | -e 's@/Cargo.toml:license.*= *"@|@' \ | ||||
-e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' | -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' | ||||
.endif | .endif |