* Recursive makefiles [not found] <E1VElgT-0006f7-UH@vcs.savannah.gnu.org> @ 2013-08-28 21:09 ` Ludovic Courtès 2013-08-28 21:41 ` Andreas Enge 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2013-08-28 21:09 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge <andreas@enge.fr> skribis: > commit 575ed8d5b3184493c8fe233b4d5128c495b7c652 > Author: Andreas Enge <andreas@enge.fr> > Date: Wed Aug 28 21:44:14 2013 +0200 > > doc: Create own Makefile.am in subdirectory. > > * doc/Makefile.am: New file. > * Makefile.am: Reference subdirectory doc. 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/>.) However, the snippet about the ‘doc’ directory could be moved in, say, doc.am, and have doc.am included from Makefile.am. WDYT? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recursive makefiles 2013-08-28 21:09 ` Recursive makefiles Ludovic Courtès @ 2013-08-28 21:41 ` Andreas Enge 2013-08-28 22:21 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Andreas Enge @ 2013-08-28 21:41 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel 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 ..". - It avoids clutter in the main directory (not checked this time, but I think there were a few files guix.* then). Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recursive makefiles 2013-08-28 21:41 ` Andreas Enge @ 2013-08-28 22:21 ` Ludovic Courtès 2013-08-28 22:25 ` Andreas Enge 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2013-08-28 22:21 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 854 bytes --] Andreas Enge <andreas@enge.fr> 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: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 513 bytes --] 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) < "$<" > "$@.tmp" mv "$@.tmp" "$@" -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 [-- Attachment #3: Type: text/plain, Size: 383 bytes --] 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’. ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Recursive makefiles 2013-08-28 22:21 ` Ludovic Courtès @ 2013-08-28 22:25 ` Andreas Enge 2013-08-29 20:04 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Andreas Enge @ 2013-08-28 22:25 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Thu, Aug 29, 2013 at 12:21:47AM +0200, Ludovic Courtès wrote: > Hmm, there was no Makefile in doc/, so how could “cd doc; make pdf” work? Sorry, indeed, it did not work of course. "make doc/guix.pdf". > 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. That sounds very good, thanks! Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recursive makefiles 2013-08-28 22:25 ` Andreas Enge @ 2013-08-29 20:04 ` Ludovic Courtès 2013-08-29 20:27 ` Andreas Enge 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2013-08-29 20:04 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge <andreas@enge.fr> skribis: > On Thu, Aug 29, 2013 at 12:21:47AM +0200, Ludovic Courtès wrote: >> Hmm, there was no Makefile in doc/, so how could “cd doc; make pdf” work? > > Sorry, indeed, it did not work of course. "make doc/guix.pdf". > >> 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. > > That sounds very good, thanks! I just did that in commit a9424c0 (already pushed). I think it does the right thing, but if it doesn’t, let’s discuss it. :-) Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recursive makefiles 2013-08-29 20:04 ` Ludovic Courtès @ 2013-08-29 20:27 ` Andreas Enge 0 siblings, 0 replies; 6+ messages in thread From: Andreas Enge @ 2013-08-29 20:27 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Thu, Aug 29, 2013 at 10:04:10PM +0200, Ludovic Courtès wrote: > I just did that in commit a9424c0 (already pushed). I think it does > the right thing, but if it doesn’t, let’s discuss it. :-) It works well for me, and the patch fixing the size of the graph is also a nice addition. Thanks! Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-29 20:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1VElgT-0006f7-UH@vcs.savannah.gnu.org> 2013-08-28 21:09 ` Recursive makefiles Ludovic Courtès 2013-08-28 21:41 ` Andreas Enge 2013-08-28 22:21 ` Ludovic Courtès 2013-08-28 22:25 ` Andreas Enge 2013-08-29 20:04 ` Ludovic Courtès 2013-08-29 20:27 ` Andreas Enge
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).