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
|
||||
#
|
||||
# Usage:
|
||||
# ./build-wasm-test.sh # Build all test apps (optimized)
|
||||
# ./build-wasm-test.sh --debug # Build all test apps with debug symbols
|
||||
# ./build-wasm-test.sh threadpool # Build only the threadpool test
|
||||
# ./build-wasm-test.sh --debug menu # Build only menu test with debug symbols
|
||||
# ./build-wasm-test.sh # Incremental build (default)
|
||||
# ./build-wasm-test.sh --clean # Clean build from scratch
|
||||
# ./build-wasm-test.sh --debug # Build 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
|
||||
|
||||
DEBUG_BUILD=0
|
||||
CLEAN_BUILD=0
|
||||
TARGET=""
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "--debug" ]; then
|
||||
DEBUG_BUILD=1
|
||||
elif [ "$arg" = "--clean" ]; then
|
||||
CLEAN_BUILD=1
|
||||
elif [ "$arg" != "" ]; then
|
||||
TARGET="$arg"
|
||||
fi
|
||||
|
|
@ -70,19 +74,16 @@ echo ""
|
|||
echo "=== Building test applications ==="
|
||||
cd "$WASM_APP_DIR"
|
||||
|
||||
# Determine make target and clean behavior
|
||||
# Determine make target
|
||||
if [ -n "$TARGET" ]; then
|
||||
# Single target: only clean and build that specific 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
|
||||
# All targets: clean everything first
|
||||
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
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
# ghcr.io/vslavik/bakefile:0.2 bakefile_gen
|
||||
#
|
||||
# Usage:
|
||||
# ./build-wxuniversal-wasm.sh # Clean build (default)
|
||||
# ./build-wxuniversal-wasm.sh --no-clean # Incremental build
|
||||
# ./build-wxuniversal-wasm.sh # Incremental build (default)
|
||||
# ./build-wxuniversal-wasm.sh --clean # Clean build from scratch
|
||||
|
||||
set -e
|
||||
|
||||
|
|
@ -60,9 +60,9 @@ if [ "$WX_SOURCE/configure.in" -nt "$WX_SOURCE/configure" ]; then
|
|||
(cd "$WX_SOURCE" && autoconf)
|
||||
fi
|
||||
|
||||
# Clean by default, unless --no-clean is passed
|
||||
if [ "$1" != "--no-clean" ]; then
|
||||
echo "Cleaning build directory (use --no-clean to skip)..."
|
||||
# Incremental build by default, use --clean for full rebuild
|
||||
if [ "$1" = "--clean" ]; then
|
||||
echo "Cleaning build directory..."
|
||||
rm -rf "$BUILD_DIR"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue