From owner-freebsd-questions@FreeBSD.ORG Wed Mar 16 20:32:52 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CD2916A4CE for ; Wed, 16 Mar 2005 20:32:52 +0000 (GMT) Received: from smtp.knology.net (smtp.knology.net [24.214.63.101]) by mx1.FreeBSD.org (Postfix) with SMTP id 847E343D1D for ; Wed, 16 Mar 2005 20:32:51 +0000 (GMT) (envelope-from dkelly@Grumpy.DynDNS.org) Received: (qmail 2240 invoked by uid 0); 16 Mar 2005 20:32:50 -0000 Received: from user-69-73-60-132.knology.net (HELO Grumpy.DynDNS.org) (69.73.60.132) by smtp2.knology.net with SMTP; 16 Mar 2005 20:32:50 -0000 Received: by Grumpy.DynDNS.org (Postfix, from userid 928) id 92E5064B7; Wed, 16 Mar 2005 14:32:49 -0600 (CST) Date: Wed, 16 Mar 2005 14:32:49 -0600 From: David Kelly To: FreeBSD-Questions@FreeBSD.org Message-ID: <20050316203249.GA43323@Grumpy.DynDNS.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Makefiles compatible with both BSD and GNU make? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2005 20:32:52 -0000 I got the silly idea that I want one Makefile to work with both BSD and GNU makes. Silly me. Fairly simple Makefiles work but when expanding my Makefile to include .depend generation I get tripped. BSD make automagically uses .depend if one is found. GNU make requires the file be named in an include, but the syntax of GNU include is different than BSD. As is the syntax of conditional statements. Yes, I could simply use gmake on FreeBSD and make under cygwin, but where is the fun in that? Not only no fun but nothing to be learned. Is there a way I can write the include of .depend that GNU make will use and at the same time BSD make will either ignore or do the same as GNU? Meanwhile I'm just accepting the fact on cygwin the only sure way to update is "make clean" before "make". -- David Kelly N4HHE, dkelly@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.