diff --git a/examples/auto/rust b/examples/auto/rust index 32aaeb0..d64067c 100644 --- a/examples/auto/rust +++ b/examples/auto/rust @@ -247,12 +247,12 @@ ngx_rust_module () { # Module deps are usually added to the object file targets, but we don't have any LINK_DEPS="$LINK_DEPS $ngx_rust_obj" - eval ${ngx_addon_id}_MODULES=\"\$${ngx_addon_id}_MODULES \ - $ngx_rust_target_type:$ngx_rust_target_name\" + eval ${ngx_addon_id}_RUST_TARGETS=\"\$${ngx_addon_id}_RUST_TARGETS \ + $ngx_rust_target_type:$ngx_rust_target_name\" if [ -n "$ngx_rust_target_features" ]; then - eval ${ngx_addon_id}_FEATURES=\"\$${ngx_addon_id}_FEATURES \ - $ngx_rust_target_features\" + eval ${ngx_addon_id}_RUST_FEATURES=\"\$${ngx_addon_id}_RUST_FEATURES \ + $ngx_rust_target_features\" fi . auto/module @@ -268,12 +268,12 @@ ngx_rust_make_modules () { ngx_addon_id=$(echo "$ngx_addon_name" | sed -e 's/[^A-Za-z0-9_]/_/g') ngx_cargo_manifest=${ngx_cargo_manifest:-"$ngx_addon_dir/Cargo.toml"} - eval ngx_rust_features="\$${ngx_addon_id}_FEATURES" - eval ngx_rust_modules="\$${ngx_addon_id}_MODULES" + eval ngx_rust_features="\$${ngx_addon_id}_RUST_FEATURES" + eval ngx_rust_targets="\$${ngx_addon_id}_RUST_TARGETS" - for module in $ngx_rust_modules; do - ngx_rust_target_type=${module%%:*} - ngx_rust_target_name=${module#*:} + for target in $ngx_rust_targets; do + ngx_rust_target_type=${target%%:*} + ngx_rust_target_name=${target#*:} ngx_rust_make_module done diff --git a/nginx-sys/build/main.rs b/nginx-sys/build/main.rs index a60be7f..6028f31 100644 --- a/nginx-sys/build/main.rs +++ b/nginx-sys/build/main.rs @@ -70,6 +70,14 @@ fn main() -> Result<(), BoxError> { println!("cargo:rerun-if-changed=build/wrapper.h"); let nginx = NginxSource::from_env(); + println!( + "cargo:rerun-if-changed={}", + nginx.build_dir.join("Makefile").to_string_lossy() + ); + println!( + "cargo:rerun-if-changed={}", + nginx.build_dir.join("ngx_auto_config.h").to_string_lossy() + ); // Read autoconf generated makefile for NGINX and generate Rust bindings based on its includes generate_binding(&nginx); Ok(())