[erlang-questions] Use of makefiles

Bengt Kleberg bengt.kleberg@REDACTED
Thu Mar 6 10:37:19 CET 2008


Greetings,

You are correct. If we want to build C programs the different C
compilers are more of a problem than perl or make incompatibilities. You
suggestion that erlang could help with C compilation is a very good one.

Thanks for explaining perl to me. It sounds as bad as make.

Building erlang programs is, IMHO, best done with erl -make. Users are
more interested in having later versions of the program they are really
working with. Make/Perl is only secondary in this scenario.


bengt

On Thu, 2008-03-06 at 11:51 +1300, Richard A. O'Keefe wrote:
> 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  
> > because
> > there are other make programs than gnu make out there. The 4 ones I  
> > have
> > used where not compatible. They would not run each others makefiles.
> 
> If you stick to what's described in the original Make paper, every  
> Make I
> 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  
> haven't
> 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  
> development
> stream, but there have been many versions issued in that stream.  What  
> works
> 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  
> whole new
> language?)
> >
> > 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  
> compatibility,
> and that is C compiler command line compatibility.  For example, to  
> get optimised
> 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  
> vendor
> having stopped making the hardware and having decided never to upgrade  
> the
> compiler or operating system nevertheless decided to start charging a  
> really
> ridiculous licence fee to run the thing in multiuser mode, the command  
> line switches
> 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  
> Erlang?
> 
> >
> >
> >
> > bengt
> >
> > .On Tue, 2008-03-04 at 13:09 -0500, Toby Thain wrote:
> >> On 4-Mar-08, at 11:57 AM, Bengt Kleberg wrote:
> >>
> >>> Greetings,
> >>>
> >>> 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  
> >>> kinds
> >>> of make (files).
> >>
> >> The GNU make documentation is really very good. I don't know why
> >> people rarely refer to it.
> >>
> >> --T
> >>
> >>>
> >>>
> >>> bengt
> >>>
> >>> 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>
> >>>> wrote:
> >>>>>
> >>>>> Hi Joe, I agree with you 100%. Give me emacs (with its vast
> >>>>> emacs-lisp
> >>>>> extensibility), bash (or ksh), and various UNIX command-line  
> >>>>> tools,
> >>>>> which I can combine as I wish using pipes, and keep the visual
> >>>>> tools
> >>>>> out of my way (and out of my RAM).
> >>>>
> >>>> I think this discussion has been misinterpreted :)  No one is  
> >>>> arguing
> >>>> 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
> >>>> use
> >>>> 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,  
> >>>> and
> >>>> usually ends up being less "code."
> >>>> _______________________________________________
> >>>> erlang-questions mailing list
> >>>> erlang-questions@REDACTED
> >>>> http://www.erlang.org/mailman/listinfo/erlang-questions
> >>>
> >>> _______________________________________________
> >>> erlang-questions mailing list
> >>> erlang-questions@REDACTED
> >>> http://www.erlang.org/mailman/listinfo/erlang-questions
> >>
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questions@REDACTED
> >> http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> --
> 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 mailing list