Subject: bin/8809: some makefiles doesn't use CPPFLAGS
To: None <gnats-bugs@gnats.netbsd.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: netbsd-bugs
Date: 11/16/1999 09:12:40
>Number:         8809
>Category:       bin
>Synopsis:       some makefiles doesn't use CPPFLAGS
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 16 09:03:02 1999
>Last-Modified:
>Originator:     Johan Danielsson
>Organization:
>Release:        1999-11-16
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: NetBSD blubb.pdc.kth.se 1.4M NetBSD 1.4M (BLUBB) #88: Tue Nov 9 20:40:15 CET 1999 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/anoncvs/src/sys/arch/i386/compile/BLUBB i386


>Description:

I'm trying to build everything with DESTDIR set, and apparently I
don't have a <sys/endian.h> in /usr/include (but in DESTDIR). Some
makefiles don't get the special handling of DESTDIR in CPPFLAGS. There
might be more than these.

>How-To-Repeat:

# cd /usr/src/games
# make -k
all ===> adventure
...
all ===> fortune/strfile
cc -O  -c strfile.c
In file included from strfile.c:62:
strfile.h:42: sys/endian.h: No such file or directory
*** Error code 1 (continuing)
`all' not remade because of errors.
all ===> fortune/datfiles
...
all ===> monop
cc -O   -o initdeck /usr/misc/src/netbsd/anoncvs/src/games/monop/initdeck.c
/usr/misc/src/netbsd/anoncvs/src/games/monop/initdeck.c:54: sys/endian.h: No suc
h file or directory
*** Error code 1 (continuing)
`all' not remade because of errors.
all ===> morse
...

A correct compilation command looks like:

    cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes \
            -Wpointer-arith -Werror -nostdinc \
            -idirafter /usr/misc/src/netbsd/dest/usr/include -c wump.c

>Fix:

I don't know the reason for the special makefiles, so I'm not going to
attempt to fix it.
>Audit-Trail:
>Unformatted: