Date: Thu, 22 Mar 2018 07:12:05 +1100 From: andrew clarke <mail@ozzmosis.com> To: "Ronald F. Guilmette" <rfg@tristatelogic.com> Cc: freebsd-questions@freebsd.org Subject: Re: "Portable" conditionalization of Makefiles Message-ID: <20180321201205.oqkgbaz5ly7ffxkc@ozzmosis.com> In-Reply-To: <99925.1521593119@segfault.tristatelogic.com> References: <99925.1521593119@segfault.tristatelogic.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue 2018-03-20 17:45:19 UTC-0700, Ronald F. Guilmette (rfg@tristatelogic.com) wrote: > Of course, these two make programs have implemented different, and > apparently incompatable syntaxes for conditionalization... with the > FreeBSD make using directives like ifeq/else/endif and GNU make using > directives like .if/.else/.endif > > I *really* don't want to use any mechanism which builds the Makefile > on the fly, like configure/autoconf and friends. (I have always felt > that those things were abominations... basically elephant guns, often > used ridiculously to kill mere gnats.) Another option would be to use CMake, but autotools are overkill for small projects. The easiest thing to do is just to require GNU Make for the FreeBSD version. "pkg install gmake" as root, then build with "gmake" instead of "make". The alternative is just to write two separate makefiles, but that is error-prone.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180321201205.oqkgbaz5ly7ffxkc>