guile-user
[Top][All Lists]
Advanced

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

Re: Issue with compiling to scheme


From: Thien-Thi Nguyen
Subject: Re: Issue with compiling to scheme
Date: Mon, 12 Aug 2013 15:17:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

() address@hidden
() Sat, 03 Aug 2013 13:12:48 -0400

   I can't see a way to do that without wrapping the whole set of
   expressions in `begin', but that's what creates the problem I
   described above.  I can hack a solution for now but if anyone
   knows a clean way to do it, that'd be much appreciated.

Maybe the simplest way is to completely separate code generation from
compilation.  This also gives you an opportunity to do compilation in
two places (of the code that generates the code, and of the generated
code).  So your Makefile would look like:

 gen: gen.scm
         $(COMPILE) -o $@ $(COMPILEFLAGS) $<
         chmod +x gen
 
 %.generated : %.xml
         ./gen -o $@ $(GENFLAGS) $<
 
 %.go : %.generated
         $(COMPILE) -o $@ $(COMPILEFLAGS) $<

This presumes that $(COMPILE) can create an executable -- not merely
"loadable" -- file.  (I wouldn't know, personally; under Guile 2, i
still keep ‘GUILE_AUTO_COMPILE=0’ in the environment.)

Anyway, once you discover and settle on the cleanest methods, i invite
you to write it up in Texinfo and add it to CMOD-PLAY:

 http://www.gnuvola.org/software/cmod-play/

I am very much looking forward to learning what you discover, and
applying it to all the projects i maintain.  (For example, Guile-SDL
test/gfx.scm is a dog under Guile 2.x, blech.)  Fingers crossed...

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: pgpqIsGsgFnBE.pgp
Description: PGP signature


reply via email to

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