[gambit-list] Conditional compilation based on backend

Marc Feeley feeley at iro.umontreal.ca
Mon Feb 23 12:55:21 EST 2015


Yes there’s a macro for that, macro-case-target.

  (include “~~lib/_gambit#.scm”)

  (macro-case-target
    ((c) ...) ;; when target is C
    ((js) ...) ;; when target is JavaScript
    (else ...)) ;; otherwise

Marc


> On Feb 23, 2015, at 9:35 AM, Guillaume Cartier <gucartier at gmail.com> wrote:
> 
> Hi,
> 
> I want to expand a macro based on what backend (c, js, ...) is currently used to compile the file.
> 
> Does the backend install a cond-expand symbol that I can reference or else is there a way to know what is the current backend from my macro?
> 
> Thanks,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4839 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150223/627cc009/attachment.bin>


More information about the Gambit-list mailing list