1 # SPDX-FileCopyrightText: The ilo Authors
2 # SPDX-License-Identifier: 0BSD
4 MAKEFLAGS
+= --warn-undefined-variables
6 .SHELLFLAGS
:= -eu
-o pipefail
-c
11 TIMESTAMPED_VERSION
:= $(shell /bin
/date
"+%Y.%m.%d-%H%M%S")
12 CURRENT_DATE
:= $(shell /bin
/date
"+%Y-%m-%d")
13 USERNAME
:= $(shell id
-u
-n
)
14 USERID
:= $(shell id
-u
)
15 GREEN
:= $(shell tput
-Txterm setaf
2)
16 WHITE
:= $(shell tput
-Txterm setaf
7)
17 YELLOW
:= $(shell tput
-Txterm setaf
3)
18 RESET
:= $(shell tput
-Txterm sgr0
)
22 while
(<>) { push @
{$$help{$$2 // 'targets'}}, [$$1, $$3] if
/^
([a-zA-Z0-9\
-]+)\s
*:.
*\
#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
23 print "usage: make [target]\n\n"; \
24 for
(sort keys
%help
) { \
25 print "${WHITE}$$_:${RESET}\n"; \
26 for
(@
{$$help{$$_}}) { \
27 $$sep = " " x
(32 - length
$$_->[0]); \
28 print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
36 help
: ##@other Show this help
37 @perl
-e
'$(HELP_FUN)' $(MAKEFILE_LIST
)
40 build
: ##@hacking Build everything
44 native-image
: ##@hacking Create a native image using GraalVM
45 mvn verify
--define skipNativeBuild
=false
48 clean: ##@hacking Clean build artifacts
52 ilo-build
: ##@hacking Build everything with ilo
56 ilo-native
: ##@hacking Create a native image using GraalVM with ilo
60 ilo-env
: ##@hacking Open a new development environment with ilo
64 ilo-website
: ##@hacking Build the website with ilo
68 ilo-serve
: ##@hacking Serve the website locally with ilo