Why does the .FILE Special Atom seem inconsistent on HP-UX?
The .FILE attribute marks atoms bound to existing files.
On HP-UX, targets that fail to compile may still be listed with the
.FILE attribute. This is contrary to the general expectation
that since the compilation failed the target would not exist so .FILE
would not list the target. However, in some cases the HP compilation tools
create the target output file even when compilation fails, thus
.FILE reports the existing output file.
The following example demonstrates this. The .DONE action would
be expected to list only prog1 since prog2 fails due to
a syntax error. However the .DONE will list both prog1
and prog2 because the compiler created prog2 regardless of
the error.
/* Makefile */
CC = cc
PROGS = prog1 prog2
:ALL:
prog1 :: a.c .DONTCARE
prog2 :: b.c .DONTCARE
.DONE :
: $(PROGS:A=.FILE)
$ nmake
+ cc -O -t p,/tools/nmake/hppa10/lu3.2/lib/cpp -I-D/tools/nmake/hppa10/
lu3.2/lib/probe/C/pp/B3A01E21.bincc -I- -c a.c
+ cc -O -o prog1 a.o
+ cc -O -t p,/tools/nmake/hppa10/lu3.2/lib/cpp -I-D/tools/nmake/hppa10/
lu3.2/lib/probe/C/pp/B3A01E21.bincc -I- -c b.c
+ cc -O -o prog2 b.o
/usr/ccs/bin/ld: Unsatisfied symbols:
printff (code)
make: *** exit code 1 making prog2
+ : prog1 prog2
$ ls -l prog*
-rwxr-xr-x 1 richb richb 24628 Jun 12 10:49 prog1
-rw-r--r-- 1 richb richb 24628 Jun 12 10:49 prog2
Last Update: Wednesday,20-Dec-06 13:21:57 CST
|