chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Extensions and my scons-chicken.


From: Thomas Chust
Subject: Re: [Chicken-users] Extensions and my scons-chicken.
Date: Sat, 05 Nov 2005 22:16:07 -0000
User-agent: Opera M2/8.02 (MacPPC, build 2148)

Am 05.11.2005, 18:06 Uhr, schrieb Pupeno <address@hidden>:

[...]
Should I scan all the sources to find (declare (uses <extname>)) and then look
for the /usr/local/lib/chicken/<extname>.setup, extract all the filenames
from the file list and link against them all ?
[...]

Hello,

it would probably be the best solution if you did, but unless you are keen
on writing an s-expression parser in Python, you should perhaps delegate that
job to a CHICKEN script, which will be very easy to write.

Something along these lines should do:

(use srfi-1 extras)

(for-each
 (lambda (sxp)
   (if (memq (car sxp) '(use require-extension))
       (for-each
        (lambda (ext)
          (for-each
           print
           (alist-ref 'files (extension-information ext) eq? '())))
        (cdr sxp))))
 (read-file (car (command-line-arguments))))

Or you could just do quick and dirty regular expression pattern matching from
Python...

cu,
Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]