-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 1009 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Main Makefile (includes sub-Makefiles)
# Build *directory* root path
ROOT_BUILD_PATH := build
# Required for proper exit codes (on continuous integration systems) due to use
# of `tee`
SHELL := /bin/bash -o pipefail
# Do not keep target files of recipes that failed
.DELETE_ON_ERROR:
# Prompt shown with each printed message
PROMPT := Make:
# Help (default target)
.DEFAULT_GOAL := help
HELP += help~Print_help_message
.PHONY: help
help:
@echo "$(PROMPT) [HELP] Available targets:"
@printf '$(PROMPT) [HELP] * %s\n' $(sort $(HELP)) | \
sed \
-e 's/~/ - /g' \
-e 's/_/ /g'
@echo "$(PROMPT) [HELP] Available build types (via variable \`t\`):"
@printf '$(PROMPT) [HELP] * %s\n' $(sort $(VAR_PTS))
# Insert all sub-Makefiles
include make/*.mk
# Cleanup all
HELP += clean-all~Clean_up_all_targets
.PHONY: clean-all
clean-all:
rm -rf $(ROOT_BUILD_PATH)/*
@echo "$(PROMPT) All cleaned up"
@touch $(ROOT_BUILD_PATH)/.gitkeep # Remove; only used for template repository