Make build scripts use incremental builds by default
- build-wxuniversal-wasm.sh: Default to incremental, add --clean flag - build-wasm-test.sh: Remove automatic clean, add --clean flag Performance: - No changes: ~0.3s (was full rebuild) - Single file change: ~5s (just that file) - Clean rebuild: use --clean flag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
355115f30d
commit
c4cd69f28d
2 changed files with 19 additions and 18 deletions
|
|
@ -3,20 +3,24 @@
|
||||||
# This script creates library symlinks and builds the test apps
|
# This script creates library symlinks and builds the test apps
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./build-wasm-test.sh # Build all test apps (optimized)
|
# ./build-wasm-test.sh # Incremental build (default)
|
||||||
# ./build-wasm-test.sh --debug # Build all test apps with debug symbols
|
# ./build-wasm-test.sh --clean # Clean build from scratch
|
||||||
# ./build-wasm-test.sh threadpool # Build only the threadpool test
|
# ./build-wasm-test.sh --debug # Build with debug symbols
|
||||||
# ./build-wasm-test.sh --debug menu # Build only menu test with debug symbols
|
# ./build-wasm-test.sh menu # Build only the menu test
|
||||||
|
# ./build-wasm-test.sh --debug menu # Build menu test with debug symbols
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DEBUG_BUILD=0
|
DEBUG_BUILD=0
|
||||||
|
CLEAN_BUILD=0
|
||||||
TARGET=""
|
TARGET=""
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ "$arg" = "--debug" ]; then
|
if [ "$arg" = "--debug" ]; then
|
||||||
DEBUG_BUILD=1
|
DEBUG_BUILD=1
|
||||||
|
elif [ "$arg" = "--clean" ]; then
|
||||||
|
CLEAN_BUILD=1
|
||||||
elif [ "$arg" != "" ]; then
|
elif [ "$arg" != "" ]; then
|
||||||
TARGET="$arg"
|
TARGET="$arg"
|
||||||
fi
|
fi
|
||||||
|
|
@ -70,19 +74,16 @@ echo ""
|
||||||
echo "=== Building test applications ==="
|
echo "=== Building test applications ==="
|
||||||
cd "$WASM_APP_DIR"
|
cd "$WASM_APP_DIR"
|
||||||
|
|
||||||
# Determine make target and clean behavior
|
# Determine make target
|
||||||
if [ -n "$TARGET" ]; then
|
if [ -n "$TARGET" ]; then
|
||||||
# Single target: only clean and build that specific target
|
|
||||||
MAKE_TARGET="$TARGET"
|
MAKE_TARGET="$TARGET"
|
||||||
# Clean just the target's files
|
|
||||||
rm -f "standalone/$TARGET/${TARGET}_test.o" \
|
|
||||||
"standalone/$TARGET/${TARGET}_test.html" \
|
|
||||||
"standalone/$TARGET/${TARGET}_test.js" \
|
|
||||||
"standalone/$TARGET/${TARGET}_test.wasm" \
|
|
||||||
2>/dev/null || true
|
|
||||||
else
|
else
|
||||||
# All targets: clean everything first
|
|
||||||
MAKE_TARGET="all"
|
MAKE_TARGET="all"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean if requested
|
||||||
|
if [ "$CLEAN_BUILD" = "1" ]; then
|
||||||
|
echo "Cleaning build artifacts..."
|
||||||
make -f Makefile.wasm clean 2>/dev/null || true
|
make -f Makefile.wasm clean 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
# ghcr.io/vslavik/bakefile:0.2 bakefile_gen
|
# ghcr.io/vslavik/bakefile:0.2 bakefile_gen
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./build-wxuniversal-wasm.sh # Clean build (default)
|
# ./build-wxuniversal-wasm.sh # Incremental build (default)
|
||||||
# ./build-wxuniversal-wasm.sh --no-clean # Incremental build
|
# ./build-wxuniversal-wasm.sh --clean # Clean build from scratch
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
@ -60,9 +60,9 @@ if [ "$WX_SOURCE/configure.in" -nt "$WX_SOURCE/configure" ]; then
|
||||||
(cd "$WX_SOURCE" && autoconf)
|
(cd "$WX_SOURCE" && autoconf)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean by default, unless --no-clean is passed
|
# Incremental build by default, use --clean for full rebuild
|
||||||
if [ "$1" != "--no-clean" ]; then
|
if [ "$1" = "--clean" ]; then
|
||||||
echo "Cleaning build directory (use --no-clean to skip)..."
|
echo "Cleaning build directory..."
|
||||||
rm -rf "$BUILD_DIR"
|
rm -rf "$BUILD_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue