routeros-scripts-main/Makefile

42 lines
1.1 KiB
Makefile
Raw Normal View History

# Makefile to generate data:
# template scripts -> final scripts
# markdown files -> html files
ALL_RSC := $(wildcard *.rsc */*.rsc)
GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
HTML := $(MARKDOWN:.md=.html)
2018-08-24 17:06:45 +02: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
.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)
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh.d/foot.html
contrib/html.sh $< > $@
rsc: $(GEN_RSC)
%.capsman.rsc: %.template.rsc contrib/template-capsman.sh
contrib/template-capsman.sh $< > $@
%.local.rsc: %.template.rsc contrib/template-local.sh
contrib/template-local.sh $< > $@
%.wifi.rsc: %.template.rsc contrib/template-wifi.sh
contrib/template-wifi.sh $< > $@
2022-09-23 15:38:31 +02:00
clean:
2025-03-26 09:19:02 +01:00
rm -f $(HTML) checksums.json