guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recursive makefiles


From: Ludovic Courtès
Subject: Re: Recursive makefiles
Date: Thu, 29 Aug 2013 00:21:47 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Andreas Enge <address@hidden> skribis:

> On Wed, Aug 28, 2013 at 11:09:40PM +0200, Ludovic Courtès wrote:
>> Please don’t do that: the build system purposefully avoids recursive
>> makefiles, to improve parallelism etc. (see
>> <http://miller.emu.id.au/pmiller/books/rmch/>.)
>
> I did it for two reasons:
> - It allows to type "make ps" and "make pdf" in the main directory,
>   instead of "cd doc; make pdf; cd ..".

Hmm, there was no Makefile in doc/, so how could “cd doc; make pdf” work?

> - It avoids clutter in the main directory (not checked this time, but I
>   think there were a few files guix.* then).

I just tried “make pdf” from 3d1b29a, and, surprise: it doesn’t do
anything.  :-)

Turns out that the “doc/guix.pdf:” line in Makefile.am annihilated the
built-in rule.  This is “fixed” with:

diff --git a/Makefile.am b/Makefile.am
index 6eb4c0f..710f708 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -210,9 +210,9 @@ DOT_OPTIONS =                                               
\
        dot -Teps $(DOT_OPTIONS) < "$<" > "address@hidden"
        mv "address@hidden" "$@"
 
-doc/guix.pdf: doc/images/bootstrap-graph.png
-doc/guix.info: doc/images/bootstrap-graph.png
-doc/guix.ps: doc/images/bootstrap-graph.eps
+# doc/guix.pdf: doc/images/bootstrap-graph.png
+# doc/guix.info: doc/images/bootstrap-graph.png
+# doc/guix.ps: doc/images/bootstrap-graph.eps
 
 if BUILD_DAEMON
With that, “make pdf” at the top level creates doc/guix.pdf, and leaves
no intermediate files at all at the top level.

Is it an acceptable solution for you (provided the bug above is fixed
nicely)?  If so, I’ll prepare a patch.

I feel quite strongly about avoid recursive Makefiles, so I’d prefer to
fix any bugs in the current build system.

Thanks,
Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]