mmm<div>seems that I will have to use Makefile instead of gsc -i</div><div>cyrille<br><br>On Monday, May 7, 2012, Bradley Lucier  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since no one else has replied yet, the answer is a variant of "it's not a bug, it's a feature".<br>
<br>
Google<br>
<br>
site:<a href="http://mercure.iro.umontreal.ca/pipermail/gambit-list/" target="_blank">http://mercure.iro.umontreal.ca/pipermail/gambit-list/</a> define-macro<br>
<br>
Brad<br>
<br>
On May 5, 2012, at 5:44 PM, Cyrille Duret wrote:<br>
<br>
> hello,<br>
> I try to build some basic script wich use external macro with -i switch from gsc and I encounter an annoying error.<br>
><br>
> Here is the simple test :<br>
> @ ll<br>
> total 6<br>
> -rw-r--r--  1 cydu  cydu  60 May  5 10:36 build.scm<br>
> -rw-r--r--  1 cydu  cydu  39 May  5 10:36 test-macro.scm<br>
> -rw-r--r--  1 cydu  cydu  55 May  5 10:36 test-simple.scm<br>
> @ more test-macro.scm<br>
> (define-macro (my-macro x)<br>
>   `(+ x 1))<br>
> @ more test-simple.scm<br>
> (define my-func<br>
>   (lambda (x)<br>
>     (+ x (my-macro x))))<br>
> @ more build.scm<br>
> (include "test-macro.scm")<br>
> (compile-file "test-simple.scm")<br>
> @ gsc-gambit -i build.scm<br>
> @ gsi-gambit<br>
> Gambit v4.6.4<br>
><br>
> > (load "test-simple")<br>
> *** WARNING -- Variable "my-macro" used in module "test-simple.o1" is undefined<br>
> "/usr/users/cydu/tmp/bug-test/test-simple.o1"<br>
> ><br>
> *** EOF again to exit<br>
> @ rm test-simple.o1<br>
> @ gsc-gambit<br>
> Gambit v4.6.4<br>
><br>
> > (include "test-macro.scm")<br>
> > (compile-file "test-simple.scm")<br>
> "/usr/users/cydu/tmp/bug-test/test-simple.o1"<br>
> ><br>
> *** EOF again to exit<br>
> @ gsi-gambit<br>
> Gambit v4.6.4<br>
><br>
> > (load "test-simple")<br>
> "/usr/users/cydu/tmp/bug-test/test-simple.o1"<br>
> > (my-func 3)<br>
> 7<br>
> ><br>
> It fails from the i switch and succeed when I launch gsc and type the commands by myself.<br>
><br>
> It seems that the -i switch from gsc does not load the macro when it compile my file.<br>
> Any idea about what might cause that annoying error ?<br>
><br>
> thanks a lot<br>
> cyrille<br>
> _______________________________________________<br>
> Gambit-list mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'Gambit-list@iro.umontreal.ca')">Gambit-list@iro.umontreal.ca</a><br>
> <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br>
</blockquote></div>