HELLO MAX
After using makefiles for years, I've finally decided to switch, because they were mostly giving me headaches.
I have to say, in 20 minutes of using Capri, it's effing-fantastic.
Three things though:
1. Is it possible to define a variable at top-level of a Capri script 'statically'? Right now I'm trying to have a so-called 'project directory' using File.getCurrentDirectory(). Unfortunately, including this root-level build.capri script recomputes the function call, so I can't get a statically defined variable like that without hard coding it...
2. Somewhat related to (1), is it possible to dynamically import scripts at runtime? For instance looping through some files in a folder and calling import "{file}"; would be really cool!
3. Bug report... Unfortunately. Doing something like this:
Code:
task all depends build, buildLib;
task build depends compile, link;
task compile { ... }
task link { ... }
task buildLib { ... }
somehow results in a "dependency failed for task 'all'"... except both compile and link are actually called, and return true.
After some digging, replacing
Code:
task build depends compile, link;
with
Code:
task build { compile(); link(); }
Solves the issue. Just a small bug, not exactly disastrous but hopefully worth looking into, yes?
Thanks! You have successfully rid me of my makefile addiction, hopefully this goes open source soon!