guile-devel
[Top][All Lists]
Advanced

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

Re: Autocompilation/LilyPond


From: Mark H Weaver
Subject: Re: Autocompilation/LilyPond
Date: Fri, 09 Mar 2012 13:57:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

David Kastrup <address@hidden> writes:

>> In the long run, I think this is probably your best way forward, but
>> admittedly it would require more work to make this transition.
>
> The main problem is that it requires such a large reorganisation of the
> LilyPond sources that the attempts to do it in that manner tended to
> consist of outdated nontrivially rearranged parts before getting through
> peer review successfully.  LilyPond is quite a moving target.
>
> Ian Hulin has mostly worked on Guilev2 migration in that manner, and it
> has caused him to do lots of futile work, a major cause of frustration
> for him and of worry for others because the large reorganisations made
> the work hard to verify.
>
> So while this might be the "if everything was written from scratch, it
> would make most sense to do it this way" approach, it has proven less
> than fabulous as a migration strategy [...]

Okay, understood.  The other alternatives are workable, with the build
script written in Scheme probably being the most future-proof of the
remaining options.

It occurs to me that if the "lilypond module" has not already been set
up, then it will be completely empty and not suitable for compiling
anything, so in that case you'll want to do something closer to this:

  (define lilypond-module (make-fresh-user-module))
  (module-use! lilypond-module (resolve-interface '(guile)))
  (set-module-name! lilypond-module '(LILYPOND MODULE NAME))
  (set-current-module lilypond-module)
  (for-each (lambda (base-name)
              (let ((scm-file-name (string-append base-name ".scm"))
                    (go-file-name  (string-append base-name ".go")))
                (compile-file scm-file-name
                              #:output-file go-file-name
                              #:env (current-module)
                              #:opts %auto-compilation-options)
                (load scm-file-name)))
            <LIST-OF-BASE-NAMES>)

BTW, if I wanted to take a look to try to get it working myself, what
branch of the lilypond git repo should I look at?

    Thanks,
      Mark



reply via email to

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