[darcs-users] darcs patch: Generate SRC_DIRS programmatically. (and 18 more)

Trent W. Buck trentbuck at gmail.com
Tue Oct 28 02:34:05 UTC 2008

Eric Kow <kowey at darcs.net> writes:

Thanks for the patch review!

> Just chipping in to the review for some of the patches in this series.
> We might as well simplify the makefile if we're still going to need it
> around for some stuff (running tests, generating docs, etc, hoogleindex,
> etc)

Note that this bundle only exists to split up darcs.lhs; there's another
post referring to SRC_DIRS and about 45 more, which contains all the
makefile patches.  I was actually planning to resend smaller sub-bundles
so that they're easier to review; I might do that if/once this bundle is

> Leverage gmake's order-only dependencies.
> -----------------------------------------
>> +# The "| %.dvi" declares an order-only dependency, thereby ensuring
>> +# that make -j2 won't run both pdflatex and latex at the same time,
>> +# but still allowing PDFs to be built without ever building the PS or
>> +# DVI versions.
>> +%.pdf : %.tex | %.dvi
> Nice... maybe this was what was breaking the parallel make dist?
> I thought this might be related to http://bugs.darcs.net/issue506
> but I see it has already been closed, nevermind

The semantics I replaced should have essentially linearized the parallel
make across .pdf and .ps.  I believe that my change preserves this
linearization -- which is necessary because both rules create and refer
to in-place intermediaries like .aux and .toc.  The difference is that
my change means that you can do "make pdf" and it won't forcibly build
the (unwanted) PostScript version as well.

> Make it obvious why deps are being filtered.
> --------------------------------------------
> Snipping to the crucial parts...
>> - -	haddock ... -h $(filter-out %api-doc-dir,$^)
>> +	haddock ... -h $(filter %.hs %.lhs,$^)
> And a similar change below.
> Fix some predicates I accidentally reversed.
> --------------------------------------------
>> - -	@test $(HADDOCK_VERSION) -lt 2 || { echo "You need haddock 2.0.0 or later to build the API documentation"; false; }
>> +	@test $(HADDOCK_VERSION) -ge 2 || { echo "You need haddock 2.0.0 or later to build the API documentation"; false; }
> And that's what I get for now reviewing Trent's (;) patch above :-)

Actually it's my fault; when testing these changes it's very hard to
check all the different cases; particularly I need to do "make
maintainer-clean", test, then *re-test* to ensure it works if you only
do a "make clean".

Because that all takes about twenty minutes, I don't do it for every
patch.  In this case, I had already recorded a depdendent patch and thus
couldn't simply amend the semicolon-removal patch.  I was too lazy to
unrecord and re-record the dependents.

>> +install::	$(DESTDIR)$(bindir) darcs
>> +	$(INSTALL) darcs $<
> And if $(DESTDIR)$(bindir) does not exist, I guess it makes it?

Precisely; that's just a normal target now.  Make will run install
$(INSTALL) -d $@ rule for that dir only if the dir doesn't already

More information about the darcs-users mailing list