From 59d1a232c9d47bb9ff19f89cdb415d5c3ad21706 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 20 Sep 2023 18:05:08 +0200 Subject: [PATCH] Makefile: pass on parallelism to build.sh, make actions phony. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 549f626de..6d72b2077 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -default: build +# Parse -j from MAKEFLAGS for parallelism. +GERBIL_BUILD_CORES := $(or $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))),1) + +all: build build: - ./build.sh + GERBIL_BUILD_CORES=$(GERBIL_BUILD_CORES) ./build.sh install: ./install.sh @@ -10,3 +13,5 @@ clean: rm -rf build rm -rf bootstrap cd src/gambit && make clean + +.PHONY: all install clean