[8059] in Athena Bugs
BSD 4.3 make: multiple -f arguments screw up $(MFLAGS), with fix.
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Wed Aug 28 13:35:22 1991
Date: Wed, 28 Aug 91 13:35:35 -0400
From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
To: bugs@ATHENA.MIT.EDU
Cc: jfc@ATHENA.MIT.EDU, jon@ATHENA.MIT.EDU, jtkohl@ATHENA.MIT.EDU
Reply-To: tytso@ATHENA.MIT.EDU
This affects all platforms running BSD 4.3-derived make. I tried this
on tsx-11, which is running 7.3. This bug affects the ISODE
compilation; therefore, for those of you who are using ISODE, you need
to use the make found in /mit/isode/make/@sys.
Here's a demonstration of the bug:
<tytso@tsx-11> {/afs/athena.mit.edu/astaff/project/isode/isode-7.0}, Level 2
1% cd /tmp
<tytso@tsx-11> {/tmp}, Level 2
2% cat > Makefile
test:
echo $(MFLAGS)
<tytso@tsx-11> {/tmp}, Level 2
3% make -nk test
echo -nk
<tytso@tsx-11> {/tmp}, Level 2
4% make -f Makefile -n -k test
echo -nk
<tytso@tsx-11> {/tmp}, Level 2
5% make -f /dev/null -f Makefile -n -k test
echo nk
<tytso@tsx-11> {/tmp}, Level 2
6% make -f /dev/null -f /dev/null -f Makefile -n -k test
echo k
<tytso@tsx-11> {/tmp}, Level 2
7%
Here's the fix:
*** main.c.old Wed Aug 28 12:32:30 1991
--- main.c Wed Aug 28 12:35:18 1991
***************
*** 190,196 ****
break;
case 'f':
! op--; /* don't pass this one */
if(i >= argc_extend-1)
fatal("No description argument after -f flag");
if( rddescf(argv_extend[i+1]) )
--- 190,196 ----
break;
case 'f':
! *--op = '\0'; /* don't pass this one */
if(i >= argc_extend-1)
fatal("No description argument after -f flag");
if( rddescf(argv_extend[i+1]) )