Subject: Re: CFLAGS in own software makefiles and pkgsrc
To: Florian Stoehr <netbsd@wolfnode.de>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/25/2005 09:42:01
On Fri, 25 Feb 2005, Florian Stoehr wrote:

> CC=cc
> CFLAGS=-O2
> LDFLAGS=
> LIBS=-lutil

> Is this OK for pkgsrc? I think the CFLAGS will cause trouble since this
> will not allow custom CFLAGS+= in /etc/mk.conf. What to change here?

More than just CFLAGS. Maybe use ?= for the above.

> As I don't have an install target here, I'll use like
>
> do-install:
>          ${INSTALL_PROGRAM} ${WRKSRC}/myprj ${PREFIX}/bin
>          ${INSTALL_MAN} ${WRKSRC}/myprj.1 ${PREFIX}/man/man1
>
> to the pkgsrc Makefile. Also OK?

That is fine. But also add:
INSTALLATION_DIRS=	bin man/man1

 Jeremy C. Reed

p.s. I have my own personal agenda with where man should be installed. I
use:

INSTALLATION_DIRS=   bin ${PKGMANDIR}/man1
...
  ${INSTALL_MAN} ${WRKSRC}/myprj.1 ${PREFIX}/${PKGMANDIR}/man1