File: makefile

package info (click to toggle)
kid 0.9.6-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,264 kB
  • ctags: 4,633
  • sloc: python: 7,417; makefile: 120; sh: 47; xml: 4
file content (38 lines) | stat: -rw-r--r-- 962 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
SHELL = /bin/sh
RM = /bin/rm -rf
RST2HTML = rst2html.py

STYLEDIR = .
WEBHOST = kid-templating.org
WEBPATH = /var/projects/doc/kid

version_file = .version
style_files = default.css custom.css
src_files = index.txt language.txt guide.txt notes.txt readme.txt
doc_files = index.html language.html guide.html notes.html readme.html
publish_files = $(src_files) $(doc_files) $(style_files)
clean_files = $(doc_files) $(version_file) readme.txt .*.html

VERSION = $(shell grep '__version__ = ' ../kid/__init__.py | perl -p -e 's/.*"(.{1,3}).*"/\1/')

all: $(version_file) $(doc_files)

$(style_files): ;

$(version_file):
				echo $(VERSION) > .version

%.html: %.txt
				$(RST2HTML) --exit-status=3 --stylesheet=custom.css --link-stylesheet $< $@

clean: FORCE
				-$(RM) $(clean_files)

publish: all
				-ssh $(WEBHOST) "mkdir -p $(WEBPATH)/$(VERSION)"
				scp -p $(publish_files) $(WEBHOST):$(WEBPATH)/$(VERSION)/

readme.txt:
				cp ../README readme.txt

FORCE: