mirror of
https://github.com/mirror/make.git
synced 2026-09-05 06:12:55 +08:00
Support the MAKE_TMPDIR environment variable
Allow build systems to choose an alternative location for make to store its temporary files. * NEWS: Announce the new environment variable. * doc/make.texi (Temporary Files): Provide documentation. * src/misc.c (get_tmpdir): Split into a new function. Compute the temporary directory and store it in a static location. * tests/scripts/features/jobserver: Add a test of MAKE_TMPDIR.
This commit is contained in:
@@ -145,6 +145,16 @@ if (exists $FEATURES{'jobserver-fifo'}) {
|
||||
|
||||
$ENV{TMPDIR} = "nosuchdir";
|
||||
run_make_test(undef, '-j2', "/Nothing to be done/");
|
||||
|
||||
# Verify that MAKE_TMPDIR is preferred if provided
|
||||
$ENV{MAKE_TMPDIR} = '.';
|
||||
$ENV{TMPDIR} = 'nosuchdir';
|
||||
|
||||
run_make_test(q!
|
||||
recurse: ; @$(MAKE) -f #MAKEFILE# all
|
||||
all:;@echo "$$MAKEFLAGS"
|
||||
!,
|
||||
"-j2 --no-print-directory", "/--jobserver-auth=fifo:\\./");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user