Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2010 08:36:50 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        mdf@freebsd.org
Subject:   Re: sys/conf/files aicasm
Message-ID:  <201009240836.50995.jhb@freebsd.org>
In-Reply-To: <AANLkTinHcGOKaxKE4k0NFpHA5acPHWmhfHiWtFxor42U@mail.gmail.com>
References:  <AANLkTinHcGOKaxKE4k0NFpHA5acPHWmhfHiWtFxor42U@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, September 23, 2010 5:41:35 pm mdf@freebsd.org wrote:
> I can't say I understand much about the syntax of the top part of
> sys/conf/files, but this line:
> 
> 
> aicasm				optional ahc | ahd			   \
> 	dependency	"$S/dev/aic7xxx/aicasm/*.[chyl]"		   \
> 	compile-with	"CC='${CC}' ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile
> MAKESRCPATH=$S/dev/aic7xxx/aicasm" \
> 	no-obj no-implicit-rule						   \
> 	clean		"aicasm* y.tab.h"
> 
> looks to me like aicasm should only be built if I have device ahc or
> device ahd in my kernel configuration file.
> 
> But even if I make a config file without those devices (e.g. by doing
> include GENERIC then nodevices ahc, ahd) the file is still built.  Am
> I missing something about how these lines in sys/conf/files work?

I think make buildkernel may build this explicitly rather than depending on 
the Makefile to do it.

> As a side question, why does the Makefile for dev/aic7xxx/aicasm have
> -I/usr/include in CFLAGS instead of using some marcos to get to the
> source tree I'm actually building from?

Because it needs to be built on the host and run on the host.  For a cross-
build the source tree you are building from might very well be for a different 
architecture and can't be used to build a binary that will run on the host.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009240836.50995.jhb>