[comp.sys.sun] possible make

Jonathan_Thornburg@mtsg.ubc.ca (10/28/89)

I have found what looks like a bug in make(1).  A ".PRECIOUS" target
seems to be being interpreted as a "real" target, so
        target          : stuff
        .PRECIOUS       : target
                commands
works differently from
        .PRECIOUS       : target 
        target          : stuff
                commands
Is this a bug, a "feature", or have I just not RTFM carefully enough?

We're running 4.0.3_EXPORT.  The behavior is identical on a 3/60 and a
4/280.  The script below was done on the 3/60.  Our mail machine is an
IBM mainframe which doesn't like tabs and other non-EBCDIC-printing
beasties, so these may (probably) have disappeared in the following
script.  But they were there ok on the Sun (I checked).

Script started on Fri Oct 27 13:43:09 1989
% cat makefile
# Makefile to demonstrate possible make(1) bug.
#
# Repeat-by:
#       touch foo.c bar.c
#       rm -f foo.a bar.a
#       make foo.a bar.a
#
foo.a           : foo.c
.PRECIOUS       : foo.a
        echo 'checkpoint 1'
#
.PRECIOUS       : bar.a
bar.a           : bar.c
        echo 'checkpoint 2'
%
% touch foo.c bar.c
% rm -f foo.a bar.a
% make foo.a bar.a
echo 'checkpoint 2'
checkpoint 2
%
% head -1 /etc/motd
SunOS Release 4.0.3_EXPORT (MUSCA) #1: Thu Aug 24 19:54:26 PDT 1989
% whereis make
make: /bin/make /usr/bin/make /usr/old/make /usr/include/make /usr/man/man1/make.1
% echo $path
. /home/jonathan/lbin /home/jonathan/lbin.sun3 /usr/local/bin /bin /usr/bin /usr/ucb /usr/etc /usr/old
% lsl /bin/make
-rwxr-xr-x  1 root        81920 Apr 24  1989 /bin/make*
% sum /bin/make
53691    80
% strings /bin/make | fgrep '@(#)'
@(#)ar.c 1.13 88/02/07 Copyr 1986 Sun Micro
@(#)doname.c 1.46 88/02/07 Copyr 1986 Sun Micro
@(#)dosys.c 1.15 88/12/27 Copyr 1986 Sun Micro
@(#)files.c 1.12 88/02/07 Copyr 1986 Sun Micro
@(#)macro.c 1.21 88/12/27 Copyr 1986 Sun Micro
@(#)main.c 1.48 88/12/27 Copyr 1986 Sun Micro
@(#)misc.c 1.20 88/12/27 Copyr 1986 Sun Micro
@(#)read.c 1.39 88/12/27 Copyr 1986 Sun Micro
@(#)state.c 1.13 88/02/07 Copyr 1986 Sun Micro
@(#)access.c 1.3 88/02/08 Copyright 1986 Sun Micro
@(#)execve.c 1.4 88/02/08 Copyright 1986 Sun Micro
@(#)lstat.c 1.3 88/02/08 Copyright 1986 Sun Micro
@(#)open.c 1.3 88/02/08 Copyright 1986 Sun Micro
@(#)readlink.c 1.3 88/02/08 Copyright 1986 Sun Micro
@(#)report.c 1.4 88/06/10 Copyright 1986 Sun Micro
@(#)stat.c 1.3 88/02/08 Copyright 1986 Sun Micro
@(#)vroot.c 1.6 88/02/08 SMI
@(#)lock.c 1.1 88/06/10 Copyright 1986 Sun Micro
% exit
%
script done on Fri Oct 27 13:44:39 1989

- Jonathan Thornburg
  Dept. of Geophysics & Astronomy
  The University of British Columbia      thornburg@mtsg.ubc.ca
  Vancouver   BC   V6T 1W5              userbkis@ubcmtsg.bitnet
  Canada                    ubc-vision!ubcmtsg.bitnet!thornburg