[gambit-list] include problems...

David St-Hilaire sthilaid at iro.umontreal.ca
Wed Oct 28 20:19:15 EDT 2009


I need a little help here... Let's say I have all my source code in a project
subdir called "src". These source files include code that gets compiled into .o1
and also macro files which needs to be included in order to be used.

Then lets say that I have this other "test" dir which have some test source
code. My test needs to include files in src so I add this in my test/tester.scm

1> (include "../src/mymacrofile.scm")

But the problem is that this src/mymacrofile.scm also needs to include another
file in src... o_O

In mymacrofile.scm, I tried to add the

2> (include "othermacrofile.scm")

file where needed but it fails because that the first include happens in the
test dir and thus "test/othermacrofile.scm" is of course not found...

I also tried to remove the 2nd include and add

3> (include "../src/othermacrofile.scm")
1> (include "../src/mymacrofile.scm")

before the 1st include and it doesnt work either. The macro calls in the
mymacrofile can't find the macro defnied in othermacrofile...

Finally I tried

(parameterize ((current-directory "../src"))
  (include "othermacrofile.scm")
  (include "mymacrofile.scm"))

It of course doesnt work either... What solution is there to cleanly have these
cascaded includes?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20091028/5d76e317/attachment.sig>

More information about the Gambit-list mailing list