Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 08:54:48 -0400 (EDT)
From:      Daniel Feenberg <feenberg@nber.org>
To:        "Ronald F. Guilmette" <rfg@tristatelogic.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: "Portable" conditionalization of Makefiles
Message-ID:  <alpine.LRH.2.21.1803210851190.6509@sas1.nber.org>
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, 20 Mar 2018, Ronald F. Guilmette wrote:

>
>
> I have a pile of (mostly) C code that I wrote myself over the past
> several years.  I developed it on FreeBSD but have always thought
> that it would be Nice if it compiled and ran also on Linux.
>
> I just spent about a day editing the various files to make it all
> compile and link OK on Linux.  So that part is all done now.  But
> here's the one remaining problem:
>
> There's a chance that I may distribute this stuff someday.  When and
> if I do, I'd like to be able to tell people to "just run make" in the
> top-level directory, regardless of whether they are on Linux or *BSD.
> (I -could- just tell people to use gmake if they are on *BSD, but I'd
> rather not.)
>

Why not concatenate all the C code (including the library) into a single 
large file and let people just compile it on whatever system they have? 
Make is for developers, so that they can avoid compiling everything when 
they change a small routine. But your users are not developers, and don't 
recompile every day, so they don't benefit from make, it only introduces 
an incompatibility.

daniel feenberg



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?alpine.LRH.2.21.1803210851190.6509>