* Norman Gray <[email protected]> [161025 12:28]: > > Greetings. > > I'm (still) trying to assemble a .c version of a simple but non-trivial > Chicken program, for subsequent bundling and distribution. I'm having > difficulties. > > I've managed to assemble a set of dependencies for the various eggs > required. The first half-dozen of these download and build successfully, > but I can't work out how to built the .c version of an egg. > > For some extensions, I can do: > > % /Data/tools/chicken-4.11.0/bin/chicken-install -r uri-match > >uri-match.log > % m=uri-match; "/Data/tools/chicken-4.11.0/bin/csc" -embedded -t > -optimize-level 3 -emit-all-import-libraries -unit $m -include-path $m > -output-file uri-match.c $m/$m.scm > > But for slightly more complicated .setup files (and uri-match.setup is an > example, with its test of (chicken-version)), this doesn't work, because csc > doesn't read the .setup file, so the above ends up calling csc in the wrong > way. > > It looks like > > % chicken-install -n uri-match > > should work, because that retains the intermediate files -- including the .c > files -- in the temporary (download) directory. But (a) the only way I can > see of finding what that temporary directory is, is by scanning the output > chatter from chicken-install, which obviously isn't robust in a Makefile; > and (b) scavenging the two .c files from this directory (namely > uri-match{,.import}.c) seems a slightly ad-hoc/hacky way of obtaining them, > which suggests I'm Doing It Wrong. > > I can't see any way of specifying a temporary directory in > chicken-install.scm. > > The Deployment page refers to 'Using the compiler' for guidance on this > route, but that page doesn't appear to cover this case. > > What am I missing?
The -k option should keep intermediate files, you can pass this with CSC_OPTIONS. For my projects I have manually unrolled the compilation stuff into a shell script. Yes it is tedious and sucks but it works. Also for CHICKEN 5 the new build system will make things easier... HTH, Christian -- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease. _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
