Files
cappuccino/Tests/Manual/Jakefile
T
David Richardson 2c06bf566f Refactor Tests/Manual orchestration
Removes recursive JAKE.subjake calls from the root Jakefile, eliminating silent error masking and path evaluation failures during test suite compilation. Replace subjake with POSIX find.

* Replaces Node-based directory traversal with POSIX find and -execdir to guarantee correct working directory context and propagate standard output.
* Restricts the `clean` task strictly to the removal of build artifacts.
* Introduces a `clobber` task to remove Frameworks symlinks alongside build artifacts, restoring the test directories to a pristine state.
2026-09-08 18:02:47 -06:00

45 lines
1.4 KiB
JavaScript

// ./Tests/Manual/Jakefile
var ENV = process.env,
task = JAKE.task,
cp = require("child_process"),
path = require("path");
task ("default", ["build"]);
task ("configure", function()
{
var targetPath = path.join(process.cwd(), ".Frameworks");
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir sh -c 'echo \"Configuring $(basename \\\"$PWD\\\")\"; ln -sfn \"$1\" Frameworks' _ '" + targetPath + "' \\;", { stdio: "inherit" });
});
task ("build", function()
{
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake build \\;", { stdio: "inherit", env: ENV });
});
task ("build-all", ["debug", "release"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake debug \\;", { stdio: "inherit", env: ENV });
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake release \\;", { stdio: "inherit", env: ENV });
});
task ("clean", function()
{
var targetDir = ENV["BUILD_PATH"] || ENV["CAPP_BUILD"] || "Build";
cp.execSync("find . -name '" + targetDir + "' -type d -prune -exec rm -rf {} +", { stdio: "inherit" });
});
task ("clobber", ["clean"], function()
{
cp.execSync("find . -mindepth 2 -type l -name 'Frameworks' -exec rm -f {} +", { stdio: "inherit" });
});