Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2005 16:58:51 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        FreeBSD-Questions@freebsd.org
Subject:   Re: Makefiles compatible with both BSD and GNU make?
Message-ID:  <20050316225851.GA43966@Grumpy.DynDNS.org>
In-Reply-To: <20050316205017.GC27170@dan.emsphone.com>
References:  <20050316203249.GA43323@Grumpy.DynDNS.org> <20050316205017.GC27170@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 16, 2005 at 02:50:17PM -0600, Dan Nelson wrote:
> 
> FreeBSD's make understands the gnu-style include syntax with no leading
> dot, even though it's undocumented (grep for SYSVINCLUDE in the
> source).  Automake is the usual way around compatibility issues; it has
> its own conditional syntax that it expands out when it generates the
> Makefile, and will create the appropriate dependency lines.

Sure enough.

BSD make requires quotes around the filename in .include ".depend" but
if one removes the leading dot on "include" it can't find .depend if the
filename is still quoted.

This works in BSD make altho its not doing anything that isn't
automatically done:
.include ".depend"

Above is apparently the same as this in GNU make and accepted by BSD:
include .depend

This does not work in BSD as it seems to be trying to find ".depend"
with quotes, which doesn't exist:
include ".depend"

-- 
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



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