Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 11:14:21 -0700
From:      "Ronald F. Guilmette" <rfg@tristatelogic.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: "Portable" conditionalization of Makefiles
Message-ID:  <3610.1521656061@segfault.tristatelogic.com>
In-Reply-To: <alpine.LRH.2.21.1803210851190.6509@sas1.nber.org>

next in thread | previous in thread | raw e-mail | index | archive | help

In message <alpine.LRH.2.21.1803210851190.6509@sas1.nber.org>, 
Daniel Feenberg <feenberg@nber.org> wrote:

>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.

Well, I guess that's one way of looking at it.

I could also just distribute pre-built binaries only.  But as a tinkerer
myself, if I gave some of my code to other people then I would greatly
prefer to do in in a way that would be supportive of their further
tinkering with the code.

Thus, I would only ever want to give out the C code, as it is, nicely
separated out into several separate files, and all with a Makefile
attached.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3610.1521656061>