@@ -51,6 +51,13 @@ impl Build {
51
51
self
52
52
}
53
53
54
+ fn cmd_make ( & self ) -> Command {
55
+ match & self . host . as_ref ( ) . expect ( "HOST dir not set" ) [ ..] {
56
+ "x86_64-unknown-dragonfly" => Command :: new ( "gmake" ) ,
57
+ _ => Command :: new ( "make" ) ,
58
+ }
59
+ }
60
+
54
61
pub fn build ( & mut self ) -> Artifacts {
55
62
let target = & self . target . as_ref ( ) . expect ( "TARGET dir not set" ) [ ..] ;
56
63
let host = & self . host . as_ref ( ) . expect ( "HOST dir not set" ) [ ..] ;
@@ -161,6 +168,7 @@ impl Build {
161
168
"x86_64-pc-windows-gnu" => "mingw64" ,
162
169
"x86_64-pc-windows-msvc" => "VC-WIN64A" ,
163
170
"x86_64-unknown-freebsd" => "BSD-x86_64" ,
171
+ "x86_64-unknown-dragonfly" => "BSD-x86_64" ,
164
172
"x86_64-unknown-linux-gnu" => "linux-x86_64" ,
165
173
"x86_64-unknown-linux-musl" => "linux-x86_64" ,
166
174
"x86_64-unknown-netbsd" => "BSD-x86_64" ,
@@ -264,11 +272,11 @@ impl Build {
264
272
install. arg ( "install_sw" ) . current_dir ( & inner_dir) ;
265
273
self . run_command ( install, "installing OpenSSL" ) ;
266
274
} else {
267
- let mut depend = Command :: new ( "make" ) ;
275
+ let mut depend = self . cmd_make ( ) ;
268
276
depend. arg ( "depend" ) . current_dir ( & inner_dir) ;
269
277
self . run_command ( depend, "building OpenSSL dependencies" ) ;
270
278
271
- let mut build = Command :: new ( "make" ) ;
279
+ let mut build = self . cmd_make ( ) ;
272
280
build. current_dir ( & inner_dir) ;
273
281
if !cfg ! ( windows) {
274
282
if let Some ( s) = env:: var_os ( "CARGO_MAKEFLAGS" ) {
@@ -277,7 +285,7 @@ impl Build {
277
285
}
278
286
self . run_command ( build, "building OpenSSL" ) ;
279
287
280
- let mut install = Command :: new ( "make" ) ;
288
+ let mut install = self . cmd_make ( ) ;
281
289
install. arg ( "install_sw" ) . current_dir ( & inner_dir) ;
282
290
self . run_command ( install, "installing OpenSSL" ) ;
283
291
}
0 commit comments