summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]build.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/build.rs b/build.rs
index 8113d1c..e3491bb 100644..100755
--- a/build.rs
+++ b/build.rs
@@ -1,15 +1,18 @@
 fn main() {
+    println!("cargo::rerun-if-env-changed=PKGDATADIR");
+    println!("cargo::rerun-if-env-changed=LOCALEDIR");
+    println!("cargo::rerun-if-changed=./build.rs");
     if std::env::var_os("PKGDATADIR").is_none() {
         println!("cargo::rustc-env=PKGDATADIR={}", {
-            let mut path = std::path::PathBuf::from(std::env::var_os("OUTDIR").unwrap());
+            let mut path = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
             path.push("share");
             path
         }.display())
     }
 
     if std::env::var_os("LOCALEDIR").is_none() {
-        println!("cargo::rustc-env=PKGDATADIR={}", {
-            let mut path = std::path::PathBuf::from(std::env::var_os("OUTDIR").unwrap());
+        println!("cargo::rustc-env=LOCALEDIR={}", {
+            let mut path = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
             path.push("locale");
             path
         }.display())