build metaprogram if not present even if option not passed, run always unless specified otherwise

This commit is contained in:
Ryan Fleury committed 2026-10-07 13:13:19 -07:00
1 parent 9262938b2f
commit 9549d096fa
2 files changed
+9 -4

No files matched your search

+1
View File
@@ -136,6 +136,7 @@ popd
:: --- Build & Run Metaprogram ------------------------------------------------ :: --- Build & Run Metaprogram ------------------------------------------------
pushd build pushd build
if not exist metagen.exe set meta=1
if "%meta%"=="1" ( if "%meta%"=="1" (
echo [building metagen] echo [building metagen]
%compile_debug% ..\src\metagen\metagen_main.c %compile_link% %out%metagen.exe || exit /b 1 %compile_debug% ..\src\metagen\metagen_main.c %compile_link% %out%metagen.exe || exit /b 1
+8 -4
View File
@@ -60,14 +60,17 @@ compile() {
mkdir -p build local mkdir -p build local
# --- Build & Run Metaprogram ------------------------------------------------- # --- Build & Run Metaprogram -------------------------------------------------
cd build
if [[ ! -f metagen ]]; then meta='1'; fi
if [[ "${meta:-0}" == "1" ]] if [[ "${meta:-0}" == "1" ]]
then then
echo "[building metagen]" echo "[building metagen]"
cd build
$compiler $cc_debug ../src/metagen/metagen_main.c $cc_link -o metagen $compiler $cc_debug ../src/metagen/metagen_main.c $cc_link -o metagen
./metagen
cd ..
fi fi
if [[ ! -v no_meta ]] then
./metagen
fi
cd ..
# --- Assemble BLAKE3 --------------------------------------------------------- # --- Assemble BLAKE3 ---------------------------------------------------------
if [[ ! -f "build/blake3.a" ]] if [[ ! -f "build/blake3.a" ]]
@@ -134,6 +137,7 @@ then
fi fi
# --- Warn On Debug Builds (if debug not explicitly specified) ---------------- # --- Warn On Debug Builds (if debug not explicitly specified) ----------------
if [[ ! -v debug && ! -v release ]] then if [[ ! -v debug && ! -v release ]]
then
echo "[INFO] Debug build complete. For a faster build, call this script with the \`release\` argument (this will take significantly longer than a debug build)." echo "[INFO] Debug build complete. For a faster build, call this script with the \`release\` argument (this will take significantly longer than a debug build)."
fi fi