Date: 18 Mar 2002 08:20:27 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: Bruce Evans <bde@zeta.org.au> Cc: <arch@FreeBSD.ORG> Subject: Re: bsd.lib.mk modifications Message-ID: <xzpr8mipcjo.fsf@flood.ping.uio.no> In-Reply-To: <20020318174634.D670-100000@gamplex.bde.org> References: <20020318174634.D670-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes:
> Why not just set INCDIR? I think the most useful meaning for INCDIR is
> "the (single) directory in which the current set of includes is installed",
> not "the root of the include tree (default /usr/include)" although the
> comment in bsd.own.mk suggests the latter meaning.
Ah, I interpreted it as the latter. Also, using a separate INCSUBDIR
allows the admin to set INCDIR to whatever he wants and still get
things "right" (assuming he also patched gcc to look for headers in
INCDIR); it just seemed cleaner to do it this way.
> > - make ${INCS} a prerequisite of _includeinstall so generated headers
> > will be built in time for beforeinstall (again, to avoid overriding
> > beforeinstall).
> This may result in the headers being built at install time.
Well, they should already exist at install time; the problem I'm
trying to solve is making sure they exist at 'make includes' time
during buildworld.
I now use this:
@@ -282,13 +282,17 @@
beforeinstall: _includeinstall
.endif
-_includeinstall:
+_includeinstall: ${INCS}
.if defined(INCS)
.for header in ${INCS}
+.if exists(${.OBJDIR}/${header})
+ ${INSTALL} -C -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
+ ${.OBJDIR}/${header} ${DESTDIR}${INCDIR}/${INCSUBDIR}
+.else
cd ${.CURDIR} && \
${INSTALL} -C -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
- ${header} ${DESTDIR}${INCDIR}
-
+ ${header} ${DESTDIR}${INCDIR}/${INCSUBDIR}
+.endif
.endfor
.endif
in an attempt to handle the case where we actually install generated
headers. The only case I know of so far is libcrypto, which modifies
some headers at build time to remove potentially-legally-troublesome
IDEA code, and overrides beforeinstall to deal with this. I'm trying
to make the default beforeinstall target smart enough that it doesn't
need so much overriding.
DES
--
Dag-Erling Smorgrav - des@ofug.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpr8mipcjo.fsf>
