[CM] cm with chicken

Carlos Pita carlosjosepita at gmail.com
Thu Jan 1 11:22:28 PST 2009

Attached is a modified version of premake.lua. Highlights are:

1) --juce --chicken --sndlib take either a source directory or an
installation prefix (eg /usr or /usr/src). They do some simple checks
to autodetect which is the case.

2) In case that a dependency's source directory is given, the library
used is the static one (here I avoided the
one-string-including-all-libs approach in favour of another that takes
advantage of the linkoptions property described at

3) a number of refactorings that hopefully had simplified the script.

One caveat: I'm not sure but as I've reverted to package.links to
specify needed libraries, the macos makefiles could have been broken
(the -framework stuff) . I've no way to test that at home. Anyway, if
we have an issue here, I think using linkoptions as a workaround is
more flexible and less hackish than the one-string trick.

Hope it helps. No hesitate to ask if you have any doubt or need some
help with this.


On Thu, Jan 1, 2009 at 3:33 PM,  <taube at illinois.edu> wrote:
> i believe it started because on mac had to add extries that expanded to "-framework xxx -framework yyy ... " which the linking table didnt support so I had to resort to strings. then i used that code as i ported. actually lua tables seemed pretty crappy to me at the time, i coudlnt even see how to append two tables togehter without writing a loop so using a string was easier an actually worked. but im certainly no lua expert
> ---- Original message ----
>>Date: Thu, 1 Jan 2009 15:24:28 -0200
>>From: "Carlos Pita" <carlosjosepita at gmail.com>
>>Subject: Re: [CM] cm with chicken
>>To: "Heinrich Taube" <taube at uiuc.edu>
>>Cc: cm list <cmdist at ccrma.Stanford.EDU>
>>Hi Heinrich,
>>I'm writing a number of changes to premake.lua, it's almost done but I
>>want you to clarify me a point before sending the modified version:
>>Why aren't you listing the needed libraries as different elements of
>>the links table instead of concatenating them in a long string with
>>the platform specific -l / -framework flags?
>>For example: why " -l pthread -l rt" instead of  { "pthread", "rt" }
>>On Thu, Jan 1, 2009 at 1:33 PM, Heinrich Taube <taube at uiuc.edu> wrote:
>>> ok once i check in the new premake.lua please hack it to do what you want
>>> and then send it back to me, im happy to include the mods if they dont break
>>> the other build options (there arent that many of them)
>>> On Jan 1, 2009, at 9:05 AM, Carlos Pita wrote:
>>>> , I'm writing an archlinux package for cm and it's very
>>>> difficult to specify package dependencies the way cm expects them now.
>>Cmdist mailing list
>>Cmdist at ccrma.stanford.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: premake.lua
Type: application/octet-stream
Size: 7048 bytes
Desc: not available
Url : http://ccrma-mail.stanford.edu/pipermail/cmdist/attachments/20090101/aa23fff0/attachment.obj 

More information about the Cmdist mailing list