[erlang-questions] Use of makefiles
Richard A. O'Keefe
Wed Mar 5 23:51:17 CET 2008
On 5 Mar 2008, at 8:58 pm, Bengt Kleberg wrote:
> The question I asked was if a perl program would be more likely to run
> on ''any'' machine, than a makefile. Not because the person who wrote
> the makefile forgot/failed to read the manual for gnu make, but
> there are other make programs than gnu make out there. The 4 ones I
> used where not compatible. They would not run each others makefiles.
If you stick to what's described in the original Make paper, every
have ever come across (save on Windows) is compatible with that. I try
to stick to what's described in the Single Unix Specification, and
had any trouble with portability. I haven't tried nmake on Windows, but
GNU make is available for Windows and can handle POSIX (=SUS) makefiles.
> I have heard that there is only one perl, so it should be compatible.
It is not true that there is only one Perl. There has been one Perl
stream, but there have been many versions issued in that stream. What
in Perl 5.8.8 might not work in Perl 5.4, and probably won't work in
Perl 6 if that
ever gets finished. (You are aware that Perl 6 is supposed to be a
> So, is the chance of finding perl on ''any'' computer bigger than the
> chance of finding the right make program for your makefile?
I respectfully suggest that there is a bigger problem than makefile
and that is C compiler command line compatibility. For example, to
code I write
cc -O2 foobar.c
on one machine, but
cc -xO2 foobar.c
on another, and on another machine, sadly decommissioned because the
having stopped making the hardware and having decided never to upgrade
compiler or operating system nevertheless decided to start charging a
ridiculous licence fee to run the thing in multiuser mode, the command
were different again. Come to think of it, I have three C compilers
on one machine,
all with different switches, so simply checking which operating system
it is won't help.
When I use R, all of that is handled for me; if I ask the R system to
arrange a C (or
Fortran) compilation for me, it remembers what worked when it was
built, and does
it for me. Wouldn't it be nice if installing Erlang gave you
erl cc ...
that would run a C compiler with all the right switches to work with
> .On Tue, 2008-03-04 at 13:09 -0500, Toby Thain wrote:
>> On 4-Mar-08, at 11:57 AM, Bengt Kleberg wrote:
>>> Is it not also the case that perl is more standard than make?
>> Is *everyone* supposed to rewrite make in Perl every time they want
>> to build something?
>>> I know very little of perl, but have fought at least 4 different
>>> of make (files).
>> The GNU make documentation is really very good. I don't know why
>> people rarely refer to it.
>>> On Tue, 2008-03-04 at 10:11 -0600, James Hague wrote:
>>>> On Sat, Mar 1, 2008 at 8:41 PM, Steve Vinoski <vinoski@REDACTED>
>>>>> Hi Joe, I agree with you 100%. Give me emacs (with its vast
>>>>> extensibility), bash (or ksh), and various UNIX command-line
>>>>> which I can combine as I wish using pipes, and keep the visual
>>>>> out of my way (and out of my RAM).
>>>> I think this discussion has been misinterpreted :) No one is
>>>> for IDE-like features over makefiles.
>>>> I have found that I don't need makefiles for my Erlang projects. I
>>>> either recompile the same module repeatedly or I want to rebuild
>>>> everything. The former is business as usual. The latter is easily
>>>> done with a shell script, Perl script, or short Erlang program. I
>>>> makefiles infrequently enough that I always forget the syntax and
>>>> nuances of using them. But I can bang out a Perl program that does
>>>> the same thing--even checking file modification dates and so on--in
>>>> very little time. It's more flexible than using a makefile, too,
>>>> usually ends up being less "code."
>>>> erlang-questions mailing list
>>> erlang-questions mailing list
>> erlang-questions mailing list
> erlang-questions mailing list
Te Reo Engarihi is a taonga of Te Iwi Pakeha,
ergo we should keep it pure, sans mélange, ruat caelum.
More information about the erlang-questions