Skip to content

Commit

Permalink
assume make exists in the PATH, rather than using the path found by q…
Browse files Browse the repository at this point in the history
…conf
  • Loading branch information
jkarneges committed Nov 22, 2023
1 parent eb19801 commit 071a6e3
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 @@ -124,14 +124,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 @@ -155,7 +148,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 @@ -186,7 +178,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 071a6e3

Please sign in to comment.