Common makefile (gasp) stuff

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 14 09:36:14 PST 2015


On Wed, Jan 14, 2015 at 02:58:02AM -0800, Andrei Alexandrescu via Digitalmars-d wrote:
> On 1/14/15 2:09 AM, Daniel Murphy wrote:
[...]
> >Do enough people need to that it warrants being in the makefile
> >instead of a local shell script?  Does everyone do it the same way?
> 
> Yes.
> 
> Currently I'm the site build master by default. In the near future
> there'll be several. I'd rather have anyone run a simple command than
> telling them to write their scripts.
> 
> So if next month I transfer this responsibility to Martin, I can tell:
> "to update dlang.org, run 'make rebase -j && make rsync -j'" as
> opposed to "yeah, I have some scripts somewhere, do your own or let me
> email them to you".
> 
> I don't really understand your position here. It's like you reject
> robust automation over tribal knowledge and folklore.

What stops us from adding said scripts to the dlang.org repo? Or tools,
for that matter, which is probably more appropriate.

Not everything needs to be shoehorned into the makefiles. 


> >>Overall I have difficulty understanding counterarguments.
> >>
> >>Challenge: "We should eliminate some unpleasant duplication."
> >>
> >>Response: "Make sucks. Make includes are unreliable for mythical
> >>unexplained reasons. You don't know git. You should do scripts
> >>instead."
> >>
> >>The response just doesn't follow. Care to clarify what you think we
> >>should be doing here?
> >
> >Apologies for not being clear.
> >
> >Challenge: "We should eliminate some unpleasant duplication."
> >
> >Response:  "We should avoid adding more dependencies between projects
> >at all costs."
> 
> Why? As an aside, "at all costs" is suspicious in many contexts.

Because it imposes a specific external directory structure which the
casual user has no idea about. This stuff is documented nowhere
currently -- I had to read the makefiles to figure it out for myself;
not many people have that much patience.  It makes the whole thing more
fragile because as soon as one or more repos go out-of-sync (not on
github, but in the user's local clones, which can happen very easily)
things can break horribly without any warning.

I'm astonished this has to be spelled out in, of all places, a D forum.
Surely, of all people, we D people must be all too familiar with exactly
why things like #include <../../../mylib/mymod/myheader.h> are evil? I
mean, why else would we have D modules rather than continue this
glorious C heritage? Yet here we're proposing to add the equivalent of
such out-of-tree #include's to our makefiles *and* we're straining to
find reasons why we shouldn't do it? I'm at a loss of words to describe
the cognitive dissonance here.


T

-- 
Creativity is not an excuse for sloppiness.


More information about the Digitalmars-d mailing list