@@ -189,7 +189,9 @@ impl Client {
189
189
/// Note, though, that on Windows it should be safe to call this function
190
190
/// any number of times.
191
191
pub unsafe fn from_env ( ) -> Option < Client > {
192
- let var = match env:: var ( "MAKEFLAGS" ) . or ( env:: var ( "MFLAGS" ) ) {
192
+ let var = match env:: var ( "CARGO_MAKEFLAGS" )
193
+ . or ( env:: var ( "MAKEFLAGS" ) )
194
+ . or ( env:: var ( "MFLAGS" ) ) {
193
195
Ok ( s) => s,
194
196
Err ( _) => return None ,
195
197
} ;
@@ -246,18 +248,16 @@ impl Client {
246
248
///
247
249
/// ## Platform-specific behavior
248
250
///
249
- /// On Unix and Windows this will clobber the `MAKEFLAGS` and `MFLAGS`
250
- /// environment variables for the child process, and on Unix this will also
251
- /// allow the two file descriptors for this client to be inherited to the
252
- /// child.
251
+ /// On Unix and Windows this will clobber the `CARGO_MAKEFLAGS` environment
252
+ /// variables for the child process, and on Unix this will also allow the
253
+ /// two file descriptors for this client to be inherited to the child.
253
254
pub fn configure ( & self , cmd : & mut Command ) {
254
255
let arg = self . inner . string_arg ( ) ;
255
256
// Older implementations of make use `--jobserver-fds` and newer
256
257
// implementations use `--jobserver-auth`, pass both to try to catch
257
258
// both implementations.
258
259
let value = format ! ( "--jobserver-fds={0} --jobserver-auth={0}" , arg) ;
259
- cmd. env ( "MAKEFLAGS" , & value) ;
260
- cmd. env ( "MFLAGS" , & value) ;
260
+ cmd. env ( "CARGO_MAKEFLAGS" , & value) ;
261
261
self . inner . configure ( cmd) ;
262
262
}
263
263
0 commit comments