On Fri, Feb 13, 2009 at 3:00 PM, Stephen C. Gilardi <squee...@mac.com> wrote:
>
> On Feb 13, 2009, at 3:47 PM, Mark Volkmann wrote:
>
> Is there a reason why it would be inadvisable or particularly
> difficult to create a "cljc" script, short for "Clojure compile", that
> would take a path to a Clojure source file and compile it to .class
> files? It seems tedious to have to add ":gen-class" to the source
> file, start a REPL, and enter a compile form.
>
> The requirement that the destination dir exist and be in classpath at the
> time you launch the Clojure instance that does the compiling makes it a
> little difficult. It means you can't create the target, add it to classpath,
> and compile all in one Clojure instance. Should be a show-stopper though.
> I don't see any reason why it would be inadvisable.

As far as I know, the classpath only needs clojure.jar, the src
directory and the classes directory. Here's an idea. The locations of
those could be command-line arguments to the cljc script. They could
default to simply "src" and "classes" relative to the current
directory. clojure.jar could be located via an environment variable
like CLOJURE_HOME.

Is there still a reason the compile can't be done in a single Clojure instances?

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to