Subject: Re: request comments: simple c program builder in lisp
From: (Rob Warnock)
Date: Sun, 15 Jun 2008 05:53:24 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
<> wrote:
| I am fairly new to Lisp and am trying to write a simple build tool
| for C files in order to learn lisp. I am not really interested in any
| advanced features for the build system yet as the main intent is to
| learn Lisp.

Understood, and *welcome*!

That said, at some point [though probably not now!] you should
take a look at the various packages/libraries listed here:

and especially at these:          [currently quite popular]
    Another System Definition Facility  [much older, but still used by some]
    MK-defsystem is a system definition utility; it fills a similar
    role for CL Development as make(1) does for C. ...

Note that ASDF (and possibly MK-DEFSYSTEM?) already has some hooks for
C source files, though you will have to define your own specializations
of the PERFORM method for the COMPILE-OP and LOAD-OP operations, as it
tends to be very application- and/or platform- and/or implementation-
dependent. [E.g. What do you want to *do* with your compiled C code?
Run it?  Build a DSO & link to it?] But several of the readily-available
CL libraries have useful examples in their ".asd" files:

They're all pretty similar in their handling of C files. The main
thing you might have to do is tweak the RUN-SHELL-COMMAND calls
[and/or extend the definition of RUN-SHELL-COMMAND in "asdf.lisp"
if your platform or CL implementation isn't supported].


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607