[env] HEADER_OUTPUT_DIR_C="${CARGO_MAKE_WORKING_DIRECTORY}/../includes" HEADER_OUTPUT_DIR_CPP="${CARGO_MAKE_WORKING_DIRECTORY}/../includes-cpp" HEADER_NAME="wooting-analog-plugin-dev.h" HEADER_PATH_CLEAN="${HEADER_OUTPUT_DIR_C}/wooting-analog-common*" HEADER_PATH_CLEAN_CPP="${HEADER_OUTPUT_DIR_CPP}/wooting-analog-common*" [tasks.header-cpp] command = "cbindgen" args = ["-l", "c++", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}"] [tasks.header-c] command = "cbindgen" args = ["-l", "c", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}"] [tasks.cbindgen-install] install_crate = { crate_name = "cbindgen", rustup_component_name="cbindgen", binary="cbindgen", test_arg = "--help" } command = "cbindgen" args = ["--version"] [tasks.cbindgen] dependencies=["cbindgen-install", "header-c", "header-cpp"] [tasks.gen-headers] env = { CBINDGEN_ARGS="-v" } run_task = "cbindgen" [tasks.verify-headers] env = { CBINDGEN_ARGS="--verify" } run_task = "cbindgen" [tasks.clean-headers] #env = { HEADER_POSTFIX="*" } script_runner = "@shell" script = [ ''' rm ${HEADER_PATH_CLEAN} rm ${HEADER_PATH_CLEAN_CPP} ''' ] [tasks.post-test] dependencies=["verify-headers"] [tasks.post-build] dependencies=["gen-headers"] [tasks.clean] #dependencies=["clean-headers"]