From owner-freebsd-questions@freebsd.org Wed Mar 21 20:12:17 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24D6DF63085 for ; Wed, 21 Mar 2018 20:12:17 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a43.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7158853A2 for ; Wed, 21 Mar 2018 20:12:16 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a43.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTP id 27C906002838; Wed, 21 Mar 2018 13:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ozzmosis.com; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=ozzmosis.com; bh=HZ9Ej1KHLGZjNSezeIxAQ/bfgi8=; b= kxmqG+emzArxe/m0GwiE73Ia0U+vYbufQ9VSKAdoHKm5P8ZqmqlfThjOo7XWJ5m5 A+V4XO92sjfwIrC4iVU5PSXmpFAPqCKZGs0z5sdbRW74f856jyd42evY89ZZu1is 4NUDhdV3n3OMR1TgO97+YnYJAbtl0afhm7LmasmFJAc= Received: from blizzard.ozzmosis.com (210-84-58-210.dyn.iinet.net.au [210.84.58.210]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: relay@ozzmosis.com) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTPSA id D60656002832; Wed, 21 Mar 2018 13:12:08 -0700 (PDT) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id 000552EA; Thu, 22 Mar 2018 07:12:05 +1100 (AEDT) Date: Thu, 22 Mar 2018 07:12:05 +1100 From: andrew clarke To: "Ronald F. Guilmette" Cc: freebsd-questions@freebsd.org Subject: Re: "Portable" conditionalization of Makefiles Message-ID: <20180321201205.oqkgbaz5ly7ffxkc@ozzmosis.com> References: <99925.1521593119@segfault.tristatelogic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99925.1521593119@segfault.tristatelogic.com> User-Agent: NeoMutt/20180223 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 20:12:17 -0000 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.