2019-01-02 15:41:00 +01:00
|
|
|
# Makefile to generate data:
|
|
|
|
|
# template scripts -> final scripts
|
|
|
|
|
# markdown files -> html files
|
2018-07-09 16:44:44 +02:00
|
|
|
|
2025-11-06 17:32:37 +01:00
|
|
|
ALL_RSC := $(wildcard *.rsc */*.rsc)
|
|
|
|
|
GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
|
2018-07-09 16:44:44 +02:00
|
|
|
|
2025-11-06 17:32:37 +01:00
|
|
|
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
|
|
|
|
|
HTML := $(MARKDOWN:.md=.html)
|
2018-08-24 17:06:45 +02:00
|
|
|
|
2025-11-12 17:22:30 +01:00
|
|
|
DATE ?= $(shell date --rfc-email)
|
|
|
|
|
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
|
|
|
|
|
export DATE VERSION
|
|
|
|
|
|
2025-11-06 17:32:37 +01:00
|
|
|
.PHONY: all checksums docs rsc clean
|
|
|
|
|
|
|
|
|
|
all: checksums docs rsc
|
|
|
|
|
|
|
|
|
|
checksums: checksums.json
|
|
|
|
|
|
|
|
|
|
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
|
|
|
|
contrib/checksums.sh > $@
|
|
|
|
|
|
|
|
|
|
docs: $(HTML)
|
2019-01-02 15:41:00 +01:00
|
|
|
|
2025-10-29 14:46:01 +01:00
|
|
|
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html
|
2025-09-16 12:01:32 +02:00
|
|
|
contrib/html.sh $< > $@
|
2019-01-02 15:41:00 +01:00
|
|
|
|
2025-11-06 17:32:37 +01:00
|
|
|
rsc: $(GEN_RSC)
|
|
|
|
|
|
2025-11-12 18:18:36 +01:00
|
|
|
%.capsman.rsc: %.template.rsc contrib/template-capsman.sh
|
|
|
|
|
contrib/template-capsman.sh $< > $@
|
2023-11-14 10:10:56 +01:00
|
|
|
|
2025-11-12 18:21:39 +01:00
|
|
|
%.local.rsc: %.template.rsc contrib/template-local.sh
|
|
|
|
|
contrib/template-local.sh $< > $@
|
2018-07-09 16:44:44 +02:00
|
|
|
|
2023-11-14 10:10:56 +01:00
|
|
|
%.wifi.rsc: %.template.rsc Makefile
|
2024-03-05 11:02:45 +01:00
|
|
|
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \
|
2023-11-14 10:10:56 +01:00
|
|
|
-e '/^# NOT \/interface\/wifi\/ #$$/,/^# NOT \/interface\/wifi\/ #$$/d' \
|
2023-08-07 10:00:43 +02:00
|
|
|
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
|
|
|
|
< $< > $@
|
|
|
|
|
|
2022-09-23 15:38:31 +02:00
|
|
|
clean:
|
2025-03-26 09:19:02 +01:00
|
|
|
rm -f $(HTML) checksums.json
|