View mode: basic / threaded / horizontal-split · Log in · Help
April 04, 2012
Re: Compiling with gdc vs. gdmd
Jacob Carlborg, el  3 de abril a las 19:38 me escribiste:
> >Make is only a small part of the picture, is just a dependency tracking
> >program, and a pretty good one if you ask me (but I agree it could be
> >better), to work you have to specify the dependencies (manually or
> >automatically, it's up to you). I don't know Rake but I would be very
> >surprised if it's really better than Make at doing what Make was
> >designed for. *Very surprised*.
> 
> Ok, let me rephrase that. Rakefiles have a lot better syntax than makefiles.

Fair enough. But I guess that's just personal taste, I really like Make
syntax better (the only thing that annoys me is $(variables) and
$(function call) syntax, that could be definitely better).

But to me this:
file "prog" => ["a.o", "b.o"] do |t|
 sh "cc -o #{t.name} #{t.prerequisites.join(' ')}" 
end

Looks much complicated (and with way much more syntax overhead) than
this:
prog: a.o b.o
	cc -o $@ $^

BTW, I took a look at Rake and it lacks a lot of Make features (well
GMake at least, I usually stick to GMake because it's usually available
anywhere), just for the command-line: --jobs (!), --question, --what-if,
--always-make, --keep-going. Also I didn't see anything about the
secondary expansion, rebuilding the Makefile itself, target-specific
variables, implicit rules, pattern rules with multiple targets, ....
Also for me using a declarative language instead of a imperative one is
a better choice for this kind of applications.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
aFR [afr@my.farts.cause.nuclear.reaction.org] has quit IRC (Ping timeout)
April 04, 2012
Re: Compiling with gdc vs. gdmd
On 2012-04-04 10:19, Leandro Lucarella wrote:
> Fair enough. But I guess that's just personal taste, I really like Make
> syntax better (the only thing that annoys me is $(variables) and
> $(function call) syntax, that could be definitely better).
>
> But to me this:
> file "prog" =>  ["a.o", "b.o"] do |t|
>    sh "cc -o #{t.name} #{t.prerequisites.join(' ')}"
> end
>
> Looks much complicated (and with way much more syntax overhead) than
> this:
> prog: a.o b.o
> 	cc -o $@ $^

Sure, I guess makefiles both have their pros and cons. One of the 
advantage is that you can invoke shell commands. This is at the same 
time a disadvantage, that makes the language syntax complicated. In my 
opinion it's just too many symbols.

When you need to do more complicate stuff that requires if-statements 
and functions then I think Ruby is superior.

But it might be as I've said, too many people uses Make as a build 
system and not a tracking system.

> BTW, I took a look at Rake and it lacks a lot of Make features (well
> GMake at least, I usually stick to GMake because it's usually available
> anywhere), just for the command-line: --jobs (!), --question, --what-if,
> --always-make, --keep-going. Also I didn't see anything about the
> secondary expansion, rebuilding the Makefile itself, target-specific
> variables, implicit rules, pattern rules with multiple targets, ....
> Also for me using a declarative language instead of a imperative one is
> a better choice for this kind of applications.

I've actually never done a direct comparison. It just the feel I've got 
when I've used the tools.

-- 
/Jacob Carlborg
Top | Discussion index | About this forum | D home