Skip to content

Commit

Permalink
🎉 feat(config.mak): add global Makefile configuration
Browse files Browse the repository at this point in the history
Added a global Makefile configuration file that sets the default goal to 'help', exports all variables, sets the number of cores to use, sets the shell to bash, and sets the shell flags to exit on error, pipefail, and silent. Additionally, added color variables to improve the readability of the output.
  • Loading branch information
ThomasSanson committed Jun 10, 2023
1 parent 4bd1283 commit 8153b1c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .config/make/00_config.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Makefile global config
.DEFAULT_GOAL:=help
.EXPORT_ALL_VARIABLES:
.ONESHELL:
.SILENT:
MAKEFLAGS += "-j$(NUM_CORES) -l$(NUM_CORES)"
MAKEFLAGS += --silent
SHELL:=/bin/bash
.SHELLFLAGS = -eu -o pipefail -c

# Makefile colors config
bold=$(shell tput bold)
normal=$(shell tput sgr0)
errorTitle=$(shell tput setab 1 && tput bold && echo '\n')
recommendation=$(shell tput setab 4)
underline=$(shell tput smul)
reset=$(shell tput -Txterm sgr0)
black=$(shell tput setaf 0)
red=$(shell tput setaf 1)
green=$(shell tput setaf 2)
yellow=$(shell tput setaf 3)
blue=$(shell tput setaf 4)
magenta=$(shell tput setaf 5)
cyan=$(shell tput setaf 6)
white=$(shell tput setaf 7)

define HEADER
How to use me:
make help
make bootstrap-dev
make ${cyan}<target>${reset}

endef
export HEADER

0 comments on commit 8153b1c

Please sign in to comment.