Lightpanda: the headless browser designed for AI and automation
makefile: green for success, red for errors
Adrià Arrufat57958631f462
diff --git a/Makefile b/Makefileindex 0279a332d..16a4f8f70 100644--- a/Makefile+++ b/Makefile@@ -83,7 +83,7 @@ help:# https://codeberg.org/ziglang/zig/issues/31964zig-cache-tmp:@dir=$$($(ZIG) env | sed -n 's/^ *\.global_cache_dir = "\(.*\)",$$/\1/p'); \- test -n "$$dir" || { printf "\033[33mCould not read global_cache_dir from '$(ZIG) env'\033[0m\n"; exit 1; }; \+ test -n "$$dir" || { printf "\033[31mCould not read global_cache_dir from '$(ZIG) env'\033[0m\n"; exit 1; }; \mkdir -p "$$dir/tmp"## Download the prebuilt V8 libraries (skips the 10+ min source build)@@ -93,44 +93,44 @@ download-v8:printf "\033[36mDownloading prebuilt V8 $(V8_VERSION) ($(ZIG_V8_TAG))...\033[0m\n"; \curl -fL --progress-bar -o $(V8_CACHE) \https://github.com/lightpanda-io/zig-v8-fork/releases/download/$(ZIG_V8_TAG)/$(V8_ARCHIVE) \- || (rm -f $(V8_CACHE); printf "\033[33mDownload ERROR\033[0m\n"; exit 1) )- @printf "\033[33mV8 ready: %s\033[0m\n" "$(V8_CACHE)"+ || (rm -f $(V8_CACHE); printf "\033[31mDownload ERROR\033[0m\n"; exit 1) )+ @printf "\033[32mV8 ready: %s\033[0m\n" "$(V8_CACHE)"ifeq ($(OS)_$(ARCH),linux_x86_64)@test -f $(V8_SO_CACHE) || ( \printf "\033[36mDownloading prebuilt shared V8 $(V8_VERSION) ($(ZIG_V8_TAG))...\033[0m\n"; \curl -fL --progress-bar -o $(V8_SO_CACHE) \https://github.com/lightpanda-io/zig-v8-fork/releases/download/$(ZIG_V8_TAG)/$(V8_SO_ASSET) \- || (rm -f $(V8_SO_CACHE); printf "\033[33mDownload ERROR\033[0m\n"; exit 1) )- @printf "\033[33mShared V8 ready: %s\033[0m\n" "$(V8_SO_CACHE)"+ || (rm -f $(V8_SO_CACHE); printf "\033[31mDownload ERROR\033[0m\n"; exit 1) )+ @printf "\033[32mShared V8 ready: %s\033[0m\n" "$(V8_SO_CACHE)"endif## Build v8 snapshotbuild-v8-snapshot: zig-cache-tmp@printf "\033[36mBuilding v8 snapshot (release safe)...\033[0m\n"- @$(ZIG) build $(ZIGFLAGS) -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)- @printf "\033[33mBuild OK\033[0m\n"+ @$(ZIG) build $(ZIGFLAGS) -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin || (printf "\033[31mBuild ERROR\033[0m\n"; exit 1;)+ @printf "\033[32mBuild OK\033[0m\n"## Build in release-fast modebuild: build-v8-snapshot@printf "\033[36mBuilding (release fast)...\033[0m\n"- @$(ZIG) build $(ZIGFLAGS) -Doptimize=ReleaseFast -Dsnapshot_path=../../snapshot.bin || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)- @printf "\033[33mBuild OK\033[0m\n"+ @$(ZIG) build $(ZIGFLAGS) -Doptimize=ReleaseFast -Dsnapshot_path=../../snapshot.bin || (printf "\033[31mBuild ERROR\033[0m\n"; exit 1;)+ @printf "\033[32mBuild OK\033[0m\n"## Build in debug modebuild-dev: zig-cache-tmp@printf "\033[36mBuilding (debug)...\033[0m\n"- @$(ZIG) build $(ZIGFLAGS) || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)- @printf "\033[33mBuild OK\033[0m\n"+ @$(ZIG) build $(ZIGFLAGS) || (printf "\033[31mBuild ERROR\033[0m\n"; exit 1;)+ @printf "\033[32mBuild OK\033[0m\n"## Run the server in release moderun: build@printf "\033[36mRunning...\033[0m\n"- @./zig-out/bin/lightpanda || (printf "\033[33mRun ERROR\033[0m\n"; exit 1;)+ @./zig-out/bin/lightpanda || (printf "\033[31mRun ERROR\033[0m\n"; exit 1;)## Run the server in debug moderun-debug: build-dev@printf "\033[36mRunning...\033[0m\n"- @./zig-out/bin/lightpanda || (printf "\033[33mRun ERROR\033[0m\n"; exit 1;)+ @./zig-out/bin/lightpanda || (printf "\033[31mRun ERROR\033[0m\n"; exit 1;)test: zig-cache-tmpTEST_FILTER="$(or $(F),$(TEST_FILTER))" $(ZIG) build $(ZIGFLAGS) test -freference-trace