Subject: why -nostdinc and -idirafter set when DESTDIR set?
To: None <>
From: Jeremy C. Reed <>
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

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'
/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
'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'
 -d -o root -g root -m 555'
bin/install -d -o root -g root -m 555'
/usr/pkg/bin/install -d -o root -g root -m 555'
y/netbsd/usr/pkg/bin/install -d -o root -g root -m 555'
bmake -f Makefile all

   Jeremy C. Reed