summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3a90a57f2e310934f34902eac198db42ffe9c9cf (plain)
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
40
41
42
43
44
45
46
47
48
49
50
# ex: set tabstop=4 noexpandtab: 
VERSION = $(shell cat VERSION)
NAME=kickstarter
TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")

ifeq ($(VERSION), $(TAGVER))
        TAG = $(TAGVER)
else
        TAG = "HEAD"
endif


PYTHON=python
CHEETAH=cheetah
TEMPLATES=$(wildcard *.tmpl)
TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES))
.SECONDARY: $(TEMPLATE_MODS)
KS=$(wildcard *.ks)

all: tmpls
	    python setup.py build

tmpls:
	cd kickstart; make

%.py: %.tmpl
	$(CHEETAH) compile --settings='useStackFrames=False' $<


ks: $(TEMPLATES) configurations.yaml repos.yaml
	kickstarter -c configurations.yaml -r repos.yaml

tag:
	git tag $(VERSION)

dist-bz2:
	git archive --format=tar --prefix=$(NAME)-$(VERSION)/ $(TAG) | \
		bzip2  > $(NAME)-$(VERSION).tar.bz2

dist-gz:
	git archive --format=tar --prefix=$(NAME)-$(VERSION)/ $(TAG) | \
		gzip  > $(NAME)-$(VERSION).tar.gz

dist: dist-bz2

clean:
	rm -f $(TEMPLATE_MODS)
	rm -f $(addsuffix .bak,$(TEMPLATE_MODS))
	rm -f *.pyc *.pyo
	rm -rf build/ kickstart/kickstart.py kickstart/__init__.py *~ */*~