In some situations, @code{make} will need to create its own temporary files.
These files must not be disturbed while @code{make} is running, including all
-recursively-invoked instances of @code{make}.
+recursively-invoked instances of @code{make}. All temporary filenames created
+by GNU Make will start with the letters @samp{Gm}.
@cindex @code{MAKE_TMPDIR}
If the environment variable @code{MAKE_TMPDIR} is set then all temporary files
{
/* Unfortunately glibc warns about uses of mktemp even though we aren't
using it in dangerous way here. So avoid this by generating our own
- temporary file name. */
-# define FNAME_PREFIX "GMfifo"
+ temporary file name. The template in misc.c uses 6 X's so be sure this
+ name cannot conflict with that. */
+# define FNAME_PREFIX "GmFIFO"
const char *tmpdir = get_tmpdir ();
fifo_name = xmalloc (strlen (tmpdir) + CSTRLEN (FNAME_PREFIX)
+ INTSTR_LENGTH + 2);
- sprintf (fifo_name, "%s/" FNAME_PREFIX "%" MK_PRI64_PREFIX "d",
+ sprintf (fifo_name, "%s/" FNAME_PREFIX "%03" MK_PRI64_PREFIX "d",
tmpdir, (long long)make_pid ());
EINTRLOOP (r, mkfifo (fifo_name, 0600));
static unsigned uniq = 0;
static int second_loop = 0;
- const char base[] = "gmake_tmpf";
+ const char base[] = "GmTMPF";
const unsigned sizemax = sizeof (base) - 1 + 4 + 10 + 10;
unsigned pid = GetCurrentProcessId ();