Date: Wed, 16 Mar 2005 14:32:49 -0600 From: David Kelly <dkelly@hiwaay.net> To: FreeBSD-Questions@FreeBSD.org Subject: Makefiles compatible with both BSD and GNU make? Message-ID: <20050316203249.GA43323@Grumpy.DynDNS.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050316203249.GA43323>