File: plugindocs.mk

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (36 lines) | stat: -rw-r--r-- 1,077 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
30
31
32
33
34
35
36

# Post-installation generation of plugin docs and programs.html.
# Uses hardcore GNU Make addons not likely to run on any other
# make implementation
#

HERE         = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
THERE        = $(HERE)/var
INDEX        = $(THERE)/index.html
SRC          = $(wildcard $(HERE)/*.html)
DOCS         = $(subst $(HERE), $(THERE), $(SRC))
STYLESHEETS  = $(HERE)/plugpage.xsl $(HERE)/page.xsl \

all: update

update: $(DOCS) $(INDEX)

$(DOCS): $(SRC) $(STYLESHEETS)
	if test -n "$(SRC)"; then \
	    sh $(HERE)/make-ext-driver-toc.sh $(SRC) \
	        > $(THERE)/ext-driver-toc.xsl; \
	    xsltproc --html $(HERE)/plugpage.xsl \
	        $(subst $(THERE), $(HERE), $@) > $@; \
	fi

$(THERE)/ext-driver-toc.xsl: $(SRC)
	sh $(HERE)/make-ext-driver-toc.sh $(SRC) > $@

$(INDEX): $(HERE)/index.tmpl $(STYLESHEETS) $(SRC)
	if [ -n "$(SRC)" ]; then \
	    sh $(HERE)/make-ext-driver-toc.sh $(SRC) \
	        > $(THERE)/ext-driver-toc.xsl; \
	    xsltproc --html $(HERE)/plugpage.xsl $(HERE)/index.tmpl > $@; \
	else \
	    cp empty_index.tmpl $@; \
	fi