File: Makefile

package info (click to toggle)
l2tpns 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,980 kB
  • sloc: ansic: 24,875; sh: 162; makefile: 156; perl: 139
file content (29 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
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
ifeq (,$(shell command -v pandoc))
all:
clean:
else

# Source documentation in markdown lives in the src/ folder (html and manpages).
# This is what you should edit if you want to make changes to the documentation.
# From these sources, this script generates actual manpages and general
# documentation in html using pandoc.

HTML_MD = $(wildcard src/html/*.md)
MAN_MD = $(wildcard src/man/*.md)

HTML_HTML = $(patsubst src/html/%.md,html/%.html,$(HTML_MD))
MAN_MAN = $(patsubst src/man/%.md,manpages/%,$(MAN_MD))

all: $(HTML_HTML) $(MAN_MAN)

html/%.html: src/html/%.md
	pandoc -f markdown -t html $< > $@
	echo $@ successfully built in docs/html directory

manpages/%: src/man/%.md
	pandoc -s -t man $< -o $@
	echo $@ successfully built in docs/manpages directory

clean:
	rm -f html/*.html manpages/*.[58]
endif