Skip to content

Commit

Permalink
Merge pull request #47798 from fastly/jkarneges/make-in-path
Browse files Browse the repository at this point in the history
assume make exists in the PATH, rather than using the path found by qconf
  • Loading branch information
jkarneges authored Nov 22, 2023
2 parents 181a98a + 071a6e3 commit b0d90f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 2 additions & 10 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let f = fs::File::open("conf.pri")?;
let reader = BufReader::new(f);

const CONF_VARS: &[&str] = &[
"BINDIR",
"CONFIGDIR",
"LIBDIR",
"LOGDIR",
"RUNDIR",
"MAKETOOL",
];
const CONF_VARS: &[&str] = &["BINDIR", "CONFIGDIR", "LIBDIR", "LOGDIR", "RUNDIR"];

for line in reader.lines() {
let line = line?;
Expand All @@ -156,7 +149,6 @@ fn main() -> Result<(), Box<dyn Error>> {
let lib_dir = conf.get("LIBDIR").unwrap();
let log_dir = conf.get("LOGDIR").unwrap();
let run_dir = conf.get("RUNDIR").unwrap();
let maketool = fs::canonicalize(conf.get("MAKETOOL").unwrap())?;

let root_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?);
let cpp_src_dir = root_dir.join(Path::new("src/cpp"));
Expand Down Expand Up @@ -187,7 +179,7 @@ fn main() -> Result<(), Box<dyn Error>> {

let proc_count = thread::available_parallelism().map_or(1, |x| x.get());

assert!(Command::new(maketool)
assert!(Command::new("make")
.args(["-j", &proc_count.to_string()])
.current_dir(&cpp_src_dir)
.status()?
Expand Down
2 changes: 0 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@ public:
logdir = varprefix + "/log";
conf->addExtra(QString("LOGDIR = %1/pushpin").arg(logdir));
conf->addExtra(QString("MAKETOOL = %1").arg(conf->maketool));
return true;
}
};
Expand Down
2 changes: 0 additions & 2 deletions qcm/conf.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public:
logdir = varprefix + "/log";
conf->addExtra(QString("LOGDIR = %1/pushpin").arg(logdir));

conf->addExtra(QString("MAKETOOL = %1").arg(conf->maketool));

return true;
}
};

0 comments on commit b0d90f7

Please sign in to comment.