From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: Mathieu Lirzin <mthl@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] build: Speed up .go compilation.
Date: Sun, 10 Jan 2016 21:52:34 +0100 [thread overview]
Message-ID: <87d1t9w419.fsf@T420.taylan> (raw)
In-Reply-To: <87pox9s5uh.fsf@gnu.org> (Mathieu Lirzin's message of "Sun, 10 Jan 2016 18:27:02 +0100")
Mathieu Lirzin <mthl@gnu.org> writes:
> Let me say first that I found this an amazing work!
Thanks. :-)
> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
>
>> -AM_V_GUILEC = $(AM_V_GUILEC_$(V))
>> -AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
>> -AM_V_GUILEC_0 = @echo " GUILEC" $@;
>> -
>> -# Flags passed to 'guild compile'.
>> -GUILD_COMPILE_FLAGS = \
>> - -Wformat -Wunbound-variable -Warity-mismatch
>> -
>
> It would make sense to me to keep compile options in Makefile.am and
> pass them as a command line argument to compile-all.scm. Maybe renaming
> it GUILECFLAGS or GUILEC_FLAGS or GUILE_COMPILE_FLAGS would be better (I
> think Automake won't like GUILE_CFLAGS).
Hmm, the flags are a list of symbols in the Scheme code. This has no
obvious representation in the Makefile. I guess the closest is a
whitespace separated list of strings that would be turned into a list of
symbols. Do you think it's worth this added complexity, or is there a
better way?
>> # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
>> # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
>> # there that are newer than the local .scm files (for instance because the
>> @@ -358,14 +346,16 @@ GUILD_COMPILE_FLAGS = \
>> #
>> # XXX: Use the C locale for when Guile lacks
>> # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
> ^^^
>
>> -.scm.go:
>> - $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
>> +%.go: make-go ; @:
>> +make-go: $(MODULES) guix/config.scm guix/tests.scm
>> + @echo "Compiling Scheme modules..." ; \
>> unset GUILE_LOAD_COMPILED_PATH ; \
>> LC_ALL=C \
> ^^^
>
> This is present because (scripts compile) from "old" Guile doesn't do it
> automatically. What about copying the code from the link above in
> compile-all.scm and removing this from Makefile.am ?
I should be using the whole (catch ...) expression, right? Done, thanks
for the heads up.
>> +;;; To work around <http://bugs.gnu.org/15602> (FIXME), we want to load all
>> +;;; files to be compiled first. We do this via resolve-interface so that the
>> +;;; top-level of each file (module) is only executed once.
>> +(define (load-module-file file)
>> + (let ((module (file->module file)))
>> + (format #t " LOAD ~a~%" module)
> ^^^
>> + (resolve-interface module)))
>> +
>> +(define (compile-file* file output-mutex)
>> + (let ((go (scm->go file)))
>> + (with-mutex output-mutex
>> + (format #t " GUILEC ~a~%" go)
> ^^^
> I know this was already aligned this way before, but IMO It would look
> cleaner to use the same alignment as Automake default silent rules (CC,
> GEN, MAKEINFO...) with 11 characters including space before ‘~A’:
>
> (format #t " LOAD ~A~%" source)
> (format #t " GUILEC ~A~%" source)
Done.
> Thanks,
Thanks for looking over it!
> --
> Mathieu Lirzin
Taylan
next prev parent reply other threads:[~2016-01-10 20:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 16:41 [PATCH] Makefile: Speed up .go compilation Taylan Ulrich Bayırlı/Kammer
2016-01-08 11:48 ` [PATCH] build: " Taylan Ulrich Bayırlı/Kammer
2016-01-08 17:06 ` Ludovic Courtès
2016-01-09 19:38 ` Taylan Ulrich Bayırlı/Kammer
2016-01-09 21:59 ` Ludovic Courtès
2016-01-10 10:24 ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 17:01 ` Mathieu Lirzin
2016-01-10 20:46 ` Taylan Ulrich Bayırlı/Kammer
2016-01-11 21:16 ` Ludovic Courtès
2016-01-10 13:34 ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 15:11 ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 17:27 ` Mathieu Lirzin
2016-01-10 20:52 ` Taylan Ulrich Bayırlı/Kammer [this message]
2016-01-10 21:18 ` Mathieu Lirzin
2016-01-11 21:05 ` Ludovic Courtès
2016-01-11 21:47 ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 16:47 ` Mark H Weaver
2016-01-10 20:33 ` Taylan Ulrich Bayırlı/Kammer
2016-01-11 21:14 ` Ludovic Courtès
2016-01-11 21:56 ` Taylan Ulrich Bayırlı/Kammer
2016-01-14 14:02 ` Ludovic Courtès
2016-01-17 20:16 ` Ludovic Courtès
2016-01-18 8:05 ` Taylan Ulrich Bayırlı/Kammer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1t9w419.fsf@T420.taylan \
--to=taylanbayirli@gmail.com \
--cc=guix-devel@gnu.org \
--cc=mthl@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).