File: Makefile

package info (click to toggle)
dh-lua 35
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228 kB
  • sloc: ansic: 110; perl: 93; sh: 57; makefile: 56
file content (22 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: html/policy.html

POLICY_VERSION=$(shell cd ..;dpkg-parsechangelog | grep '^Version: ' | cut -d : -f 2)

used-vars:
	lua get_used_vars.lua 

html/%.html:%.txt
	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' > $@
	echo "<html>" >> $@
	echo "<head>" >> $@
	# assume first line of markdown is main header to use for page title
	echo "<title>$(shell head -n 1 $< | sed 's/@@V@@/$(POLICY_VERSION)/')</title>" >> $@
	echo '<link type="text/css" rel="stylesheet" href="style.css"/>' >> $@
	echo "</head>" >> $@
	echo "<body>" >> $@
	cat $< | sed 's/@@V@@/$(POLICY_VERSION)/' | markdown_py >> $@
	echo "</body>" >> $@
	echo "</html>" >> $@

clean:
	rm -f html/policy.html