build: add directory-oriented make workflows
Host SITL smoke / Deterministic Gazebo command path (push) Has been cancelled
Host SITL smoke / Deterministic Gazebo command path (push) Has been cancelled
This commit is contained in:
1 parent
4bc98adbc6
commit
7dc3ccb619
40 files changed
+1367
-278
No files matched your search
+34
-8
@@ -1,12 +1,38 @@
|
||||
MDBOOK ?= mdbook
|
||||
override SHELL := /bin/sh
|
||||
override MAKEFLAGS += --no-print-directory
|
||||
|
||||
.PHONY: build serve test
|
||||
.DEFAULT_GOAL := help
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
build:
|
||||
override MDBOOK := mdbook
|
||||
|
||||
override PRIMARY_GOAL := $(firstword $(MAKECMDGOALS))
|
||||
|
||||
ifeq ($(PRIMARY_GOAL),run)
|
||||
|
||||
.PHONY: run
|
||||
|
||||
# Application arguments may also look like Make goals. The run recipe recovers
|
||||
# their exact boundaries from the original invocation.
|
||||
.DEFAULT:
|
||||
@:
|
||||
|
||||
else
|
||||
|
||||
.PHONY: help run check
|
||||
|
||||
help:
|
||||
@printf '%s\n' 'Usage: make docs -- <mdbook arguments...>' '' \
|
||||
'With no arguments, mdbook test and mdbook build are run.' \
|
||||
'Example: make docs -- build' '' \
|
||||
'Project target:' \
|
||||
' check Run mdbook test and mdbook build'
|
||||
|
||||
endif
|
||||
|
||||
check:
|
||||
$(MDBOOK) test
|
||||
$(MDBOOK) build
|
||||
|
||||
serve:
|
||||
$(MDBOOK) serve --open
|
||||
|
||||
test:
|
||||
$(MDBOOK) test
|
||||
run:
|
||||
@exec python3 ../scripts/make-argv.py exec run $(MDBOOK)
|
||||
Reference in new issue
Block a user