Skip to content

Commit 45a1228

Browse files
allow build on Mac and Linux
1 parent 259ac5d commit 45a1228

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

hts-sys/build.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ fn main() {
6666
}
6767

6868
let tool = cfg.get_compiler();
69+
#[allow(unused_variables)]
6970
let (cc_path, cflags_env) = (tool.path(), tool.cflags_env());
71+
#[allow(unused_variables)]
7072
let cc_cflags = cflags_env.to_string_lossy().replace("-O0", "");
7173
if Command::new("autoheader")
7274
.current_dir(out.join("htslib"))
@@ -77,7 +79,7 @@ fn main() {
7779
{
7880
panic!("failed to build htslib");
7981
}
80-
println!("autoheader");
82+
// println!("autoheader");
8183
if Command::new("autoconf")
8284
.current_dir(out.join("htslib"))
8385
.status()
@@ -87,7 +89,7 @@ fn main() {
8789
{
8890
panic!("failed to build htslib");
8991
}
90-
println!("autoconf");
92+
// println!("autoconf");
9193
if Command::new("sh")
9294
.current_dir(out.join("htslib"))
9395
.arg("./configure")
@@ -99,22 +101,20 @@ fn main() {
99101
{
100102
panic!("failed to build htslib");
101103
}
102-
println!("sh ./configure");
103-
println!("{}", format!("--prefix={}/local/bin", "/Users/tom/"));
104+
// println!("sh ./configure");
105+
// println!("{}", format!("--prefix={}/local", home_dir().unwrap().into_os_string().into_string().unwrap()));
104106
if Command::new("sh")
105107
.current_dir(out.join("htslib"))
106108
.arg("./configure")
107-
.arg(format!("--prefix={}/local/bin", "/Users/tom"))
108-
// .arg("--prefix={}/local/bin")
109-
// .arg(home_dir())
109+
.arg(format!("--prefix={}/local", home_dir().unwrap().into_os_string().into_string().unwrap()))
110110
.status()
111111
.unwrap()
112112
.success()
113113
!= true
114114
{
115115
panic!("failed to build htslib");
116116
}
117-
println!("make");
117+
// println!("make");
118118
if Command::new("make")
119119
.current_dir(out.join("htslib"))
120120
.arg("install")
@@ -125,7 +125,7 @@ fn main() {
125125
{
126126
panic!("failed to build htslib");
127127
}
128-
println!("make install");
128+
// println!("make install");
129129
cfg.file("wrapper.c").compile("wrapper");
130130

131131
bindgen::Builder::default()

0 commit comments

Comments
 (0)