forked from seL4/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (47 loc) · 1.87 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 2023 seL4 Project a Series of LF Projects, LLC.
# SPDX-License-Identifier: BSD-2-Clause
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.ONESHELL:
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules
.DELETE_ON_ERROR:
.SUFFIXES:
.PHONY: help build serve debug preview clean doctor checklinks update
help:
@echo -e "Usage: make <target>. Available seL4 website targets:\n\
\n\
build Generate the static files and put them in _site/.\n\
serve Host site locally on port 4000 for previewing before commit.\n\
debug Host the development version of the site for local testing.\n\
clean Remove generated files.\n\
doctor Run jekyll doctor to check configuration.\n\
checklinks Runs html-proofer to check for broken links.\n\
update Updates all Ruby Gem versions to the newest available.\n\
help This help text.\n"
.jekyll-cache/ruby_deps: Gemfile Gemfile.lock
@bundle install
@mkdir -p .jekyll-cache/
@touch $@
JEKYLL_ENV := production
SERVE_HOST :=
build serve: .jekyll-cache/ruby_deps
# $(SERVE_HOST) is here so docker can pass in "--host 0.0.0.0" for serve
# otherwise this variable is not needed and by default empty
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll $@ $(SERVE_HOST)
debug: JEKYLL_ENV := development
debug: serve
preview: JEKYLL_ENV := development
preview: SERVE_HOST := --config "_config.yml,_preview.yml" $(SERVE_HOST)
preview: build
clean doctor:
@bundle exec jekyll $@
@rm -rf _preview/*
HTMLPROOFEROPT := --swap-urls '^https\://sel4.systems:http\://localhost\:4000'
HTMLPROOFEROPT += --enforce-https=false --only-4xx --disable-external=false
# comma-separated list of URL regexps, e.g. /twitter.com/,/facebook.com/
# twitter ignored because of rate limiting
HTMLPROOFEROPT += --ignore-urls '/twitter.com/,/flaticon.com/'
checklinks:
@bundle exec htmlproofer $(HTMLPROOFEROPT) _site
update:
@bundle update