style: Remove MOZ_DIST

As mentioned in bug 1747354, the location of the dist directory is
relied to be $topobjdir/dist, so just use that consistently rather
than getting it from a separate variable for rust build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D136556
This commit is contained in:
Mike Hommey 2023-06-06 23:44:05 +02:00 committed by Oriol Brufau
parent 54878595b3
commit d32c5ed85f

View file

@ -58,11 +58,11 @@ lazy_static! {
};
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
static ref DISTDIR_PATH: PathBuf = {
let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
if !path.is_absolute() || !path.is_dir() {
panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
panic!("MOZ_TOPOBJDIR must be an absolute directory, was: {}", path.display());
}
path
path.join("dist")
};
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
DISTDIR_PATH.join("include"),