add missing javadocs
[reguloj.git] / Makefile
blobb4d5fc6c546a38cdf206e3da13198a1a846a05aa
1 MAKEFLAGS += --warn-undefined-variables
2 SHELL = /bin/bash
3 .SHELLFLAGS := -eu -o pipefail -c
4 .DEFAULT_GOAL := all
5 .DELETE_ON_ERROR:
6 .SUFFIXES:
8 TIMESTAMPED_VERSION := $(shell /bin/date "+%Y.%m.%d-%H%M%S")
9 CURRENT_DATE := $(shell /bin/date "+%Y-%m-%d")
10 USERNAME := $(shell id -u -n)
11 USERID := $(shell id -u)
12 GREEN := $(shell tput -Txterm setaf 2)
13 WHITE := $(shell tput -Txterm setaf 7)
14 YELLOW := $(shell tput -Txterm setaf 3)
15 RESET := $(shell tput -Txterm sgr0)
17 HELP_FUN = \
18 %help; \
19 while(<>) { push @{$$help{$$2 // 'targets'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
20 print "usage: make [target]\n\n"; \
21 for (sort keys %help) { \
22 print "${WHITE}$$_:${RESET}\n"; \
23 for (@{$$help{$$_}}) { \
24 $$sep = " " x (32 - length $$_->[0]); \
25 print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
26 }; \
27 print "\n"; }
29 .PHONY: all
30 all: help
32 .PHONY: help
33 help: ##@other Show this help
34 @perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
36 .PHONY: install
37 install: ##@hacking Install all artifacts into local repository
38 mvn clean install
40 .PHONY: verify
41 verify: ##@hacking Verify all modules
42 mvn verify
44 .PHONY: site
45 site: ##@hacking Build website
46 hugo --minify --i18n-warnings --path-warnings --source docs
48 .PHONY: site-serve
49 site-serve: ##@hacking Build and watch website
50 hugo server --minify --i18n-warnings --path-warnings --source docs --watch
52 .PHONY: build-env
53 build-env: ##@hacking Open a new shell in a predefined build environment
54 ilo @build/shell
56 .PHONY: build-once
57 build-once: ##@hacking Build the entire project once in a predefined build environment
58 ilo @build/once
60 .PHONY: sign-waiver
61 sign-waiver: ##@contributing Sign the WAIVER
62 minisign -Sm AUTHORS/WAIVER
63 mv AUTHORS/WAIVER.minisig AUTHORS/WAIVER.${USERNAME}.minisig
64 git add AUTHORS/WAIVER.${USERNAME}.minisign
65 git commit -m 'sign waiver' --gpg-sign