From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 6 18:32:18 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 915FCFB6; Sun, 6 Jan 2013 18:32:18 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4701205; Sun, 6 Jan 2013 18:32:16 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id r06IWFbq093520; Sun, 6 Jan 2013 11:32:15 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r06IWD6b092830; Sun, 6 Jan 2013 11:32:13 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: Proper way to determine place of system sources in makefile? From: Ian Lepore To: lev@freebsd.org In-Reply-To: <1582957716.20130106221709@serebryakov.spb.ru> References: <1582957716.20130106221709@serebryakov.spb.ru> Content-Type: text/plain; charset="us-ascii" Date: Sun, 06 Jan 2013 11:32:12 -0700 Message-ID: <1357497132.1088.82.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2013 18:32:18 -0000 On Sun, 2013-01-06 at 22:17 +0400, Lev Serebryakov wrote: > Hello, Hackers. > > I'm writing some code, which is built outside of system sources but > depends on them. > > I'm using FreeBSD mk infrastructure. > > When code is kernel module (uses ) here is SYSDIR > variable. > > But which is proper way to refer to system sources when makefile is > prepared for shared library () or program ()? > That may depend on what you mean by "system sources." In particular, some header files which are generated during the build don't live under /usr/src/sys, they're in $OBJDIR/sys//. I was struggling with how to include such a file (in a non-hacky way) while building a bootloader from sys/boot/arm the other day, and I never did come up with a clean answer. (I do understand why -- the header files I wanted have content that changes based on KERNCONF=, and sys/boot is built during buildworld, not buildkernel.) -- Ian