refactor(kanban): move from examples/ to tools/ as a PasBuild module
The kanban board is now a proper tool alongside migration-analyser. Adds tools/kanban/project.xml (blaise-kanban module) and registers it in the root aggregator. Removes the standalone build.sh script since PasBuild handles compilation.
This commit is contained in:
parent
d517cc3ae7
commit
3ca4c5291d
5
examples/kanban/.gitignore
vendored
5
examples/kanban/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
kanban
|
||||
kanban_app.ssa
|
||||
kanban_app.s
|
||||
*.kanban
|
||||
*.kanban.d/
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Build the Kanban TUI app.
|
||||
# Usage: ./build.sh [path-to-blaise-compiler]
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
||||
# Use the main tree for compiler/QBE/RTL (worktrees don't have build artefacts)
|
||||
MAIN_ROOT="/data/devel/new-pascal-compiler"
|
||||
BLAISE="${1:-$MAIN_ROOT/compiler/target/blaise}"
|
||||
QBE="$MAIN_ROOT/vendor/qbe/qbe"
|
||||
RTL="$MAIN_ROOT/compiler/target/blaise_rtl.a"
|
||||
|
||||
echo "=== Building Kanban TUI ==="
|
||||
echo "Compiler: $BLAISE"
|
||||
echo ""
|
||||
|
||||
# Compile Blaise source to QBE IR
|
||||
echo "[1/3] Compiling Blaise source..."
|
||||
"$BLAISE" \
|
||||
--source "$SCRIPT_DIR/kanban_app.pas" \
|
||||
--unit-path "$SCRIPT_DIR" \
|
||||
--unit-path "$PROJECT_ROOT/runtime/src/main/pascal" \
|
||||
--unit-path "$PROJECT_ROOT/stdlib/src/main/pascal" \
|
||||
--emit-ir > "$SCRIPT_DIR/kanban_app.ssa"
|
||||
|
||||
# QBE: IR -> assembly
|
||||
echo "[2/3] QBE assembling..."
|
||||
"$QBE" -o "$SCRIPT_DIR/kanban_app.s" "$SCRIPT_DIR/kanban_app.ssa"
|
||||
|
||||
# Link
|
||||
echo "[3/3] Linking..."
|
||||
gcc -o "$SCRIPT_DIR/kanban" \
|
||||
"$SCRIPT_DIR/kanban_app.s" \
|
||||
"$RTL"
|
||||
|
||||
echo ""
|
||||
echo "Build successful: $SCRIPT_DIR/kanban"
|
||||
echo "Run: $SCRIPT_DIR/kanban [board.kanban]"
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
<module activeByDefault="false">stdlib</module>
|
||||
<module>compiler</module>
|
||||
<module>tools/migration-analyser</module>
|
||||
<module>tools/kanban</module>
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
|
|
|
|||
18
tools/kanban/project.xml
Normal file
18
tools/kanban/project.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<name>blaise-kanban</name>
|
||||
<!-- version inherited from root aggregator -->
|
||||
|
||||
<build>
|
||||
<packaging>application</packaging>
|
||||
<mainSource>kanban_app.pas</mainSource>
|
||||
<executableName>kanban</executableName>
|
||||
|
||||
<manualUnitPaths>true</manualUnitPaths>
|
||||
<unitPaths>
|
||||
<path>src/main/pascal</path>
|
||||
<path>../../runtime/src/main/pascal</path>
|
||||
<path>../../stdlib/src/main/pascal</path>
|
||||
</unitPaths>
|
||||
</build>
|
||||
</project>
|
||||
Loading…
Reference in a new issue