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
http://premake.sourceforge.net/configuration).

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.

Regards
-Carlos




On Thu, Jan 1, 2009 at 3:33 PM,  <[email protected]> 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" <[email protected]>
>>Subject: Re: [CM] cm with chicken
>>To: "Heinrich Taube" <[email protected]>
>>Cc: cm list <[email protected]>
>>
>>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" }
>>
>>Regards
>>-Carlos
>>
>>On Thu, Jan 1, 2009 at 1:33 PM, Heinrich Taube <[email protected]> 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
>>[email protected]
>>http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>

Attachment: premake.lua
Description: Binary data

_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to