File: Makefile

package info (click to toggle)
dh-ocaml 2.5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: xml: 1,746; perl: 1,063; sh: 244; makefile: 105
file content (39 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (4)
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
37
38
39

XMLFILES = $(wildcard *.xml)
INSTALL_STUFF =				\
	ocaml_packaging_policy.html	\
	ocaml_packaging_policy.txt	\
	ocaml_packaging_reference.html  \
	ocaml_packaging_reference.txt   \
	$(NULL)
INSTALL_HOST = alioth.debian.org
INSTALL_DIR = /org/alioth.debian.org/chroot/home/groups/pkg-ocaml-maint/htdocs/

all: $(INSTALL_STUFF)

check: $(patsubst %.xml,%.check,$(XMLFILES))

%.check: %.xml included.ent
	xmllint --noout --nonet --xinclude --postvalid $<
	touch $@

%.txt: %.html
	LC_ALL=C.UTF-8 lynx -nolist -dump $< > $@

%.html: %.xml $(XMLFILES) check 
	xsltproc --xinclude --nonet -o $@ \
	  /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
	  $<

upload: all
	scp -r $(INSTALL_STUFF) $(INSTALL_HOST):$(INSTALL_DIR)
	ssh $(INSTALL_HOST) "cd $(INSTALL_DIR) && chmod -R g+w $(INSTALL_STUFF)"

clean:
	-$(RM) ocaml_packaging_policy.html
	-$(RM) ocaml_packaging_policy.txt
	-$(RM) ocaml_packaging_reference.html
	-$(RM) ocaml_packaging_reference.txt
	-$(RM) *.check

.PHONY: clean all upload clean check