Subject: why -nostdinc and -idirafter set when DESTDIR set?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 11/23/2002 18:13:07
I built a vixie-cron package which I have built many times.
Then it started building with:
gcc -Wall -Wno-unused -Wno-comment -g -I. -DCRONDIR='"/var/cron"'
-nostdinc -idirafter /usr/usr/include -c cron.c
In file included from cron.h:32,
from cron.c:28:
externs.h:24: sys/param.h: No such file or directory
externs.h:25: sys/types.h: No such file or directory
...
I guess this is set in the bsd.sys.mk.
Why is it ${DESTDIR}/usr/include (/usr/usr/include)?
Or what do I need to do to just use my regular includes under /usr/include
(as installed by my glibc and other packages)?
I can customize my pkgsrc Makefile to pre-define the CPPFLAGS, but why?
Is there some pkgsrc config to do this correctly?
The default vixie cron build is:
gcc -Wall -Wno-unused -Wno-comment -g -I. -c -o cron.o cron.c
(and works fine)
Here is some debugging:
+ cd /home/jeremy/netbsd/usr/pkgsrc/sysutils/vixie-cron/work
+ /usr/bin/env DESTDIR=/usr USETOOLS=no MAKECONF=/dev/null USETOOLS=no
OBJECT_FMT=a.out 'LDFLAGS= -Wl,-R/usr/lib -L/usr/lib'
PATH=/usr/local/bin:/usr/bin:/bin:/
usr/X11R6/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/sbin:/usr/lib/r
vplayer5.0:/home/jeremy/netbsd/usr/pkg/bin:/home/jeremy/netbsd/usr/pkg/sbin:/usr
/bin:/usr/X11R6/bin PREFIX=/usr LOCALBASE=/usr X11BASE=/usr/X11R6
CFLAGS=-g 'CPPFLAGS=-DCRONDIR='\''"/var/cron"'\'' ' FFLAGS=-O X11PREFIX=/usr/X11R6
'BSD_INSTALL_PROGRAM=/home/jeremy/netbsd/usr/pkg/bin/install -c -s -o root -g root -m
555'
'BSD_INSTALL_SCRIPT=/home/jeremy/netbsd/usr/pkg/bin/install -c -o root -g
root -m 555' 'BSD_INSTALL_DATA=/home/jeremy/netbsd/usr/pkg/bin/install -c -o
root -g root -m 444' 'BSD_INSTALL_MAN=/home/jeremy/netbsd/usr/pkg/bin/install -c -o
root -g root -m 444'
'BSD_INSTALL_PROGRAM_DIR=/home/jeremy/netbsd/usr/pkg/bin/install
-d -o root -g root -m 555'
'BSD_INSTALL_SCRIPT_DIR=/home/jeremy/netbsd/usr/pkg/
bin/install -d -o root -g root -m 555'
'BSD_INSTALL_DATA_DIR=/home/jeremy/netbsd
/usr/pkg/bin/install -d -o root -g root -m 555'
'BSD_INSTALL_MAN_DIR=/home/jerem
y/netbsd/usr/pkg/bin/install -d -o root -g root -m 555'
PKG_SYSCONFDIR=/usr/etc
bmake -f Makefile all
Jeremy C. Reed
http://bsd.reedmedia.net/