From owner-freebsd-arch Sun Mar 17 23:21:19 2002 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id A715037B440 for ; Sun, 17 Mar 2002 23:20:30 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 9AA495346; Mon, 18 Mar 2002 08:20:28 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Subject: Re: bsd.lib.mk modifications References: <20020318174634.D670-100000@gamplex.bde.org> From: Dag-Erling Smorgrav Date: 18 Mar 2002 08:20:27 +0100 In-Reply-To: <20020318174634.D670-100000@gamplex.bde.org> Message-ID: Lines: 54 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans 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