packaging: update changelog (installerfw_plugins)
[platform/upstream/kickstarter.git] / Makefile
1 VERSION = $(shell cat VERSION)
2 NAME=kickstarter
3 TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")
4
5 ifeq ($(VERSION), $(TAGVER))
6         TAG = $(TAGVER)
7 else
8         TAG = "HEAD"
9 endif
10
11
12 PYTHON=python
13 CHEETAH=cheetah
14 TEMPLATES=$(wildcard *.tmpl)
15 TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES))
16 .SECONDARY: $(TEMPLATE_MODS)
17 KS=$(wildcard *.ks)
18
19 all: tmpls
20         python setup.py build
21
22 tmpls:
23         cd kickstart; make
24
25 install: tmpls
26         python setup.py build
27         python setup.py install
28
29 %.py: %.tmpl
30         $(CHEETAH) compile --settings='useStackFrames=False' $<
31
32 ks: $(TEMPLATES) configurations.yaml repos.yaml
33         kickstarter -c configurations.yaml -r repos.yaml
34
35 tag:
36         git tag $(VERSION)
37
38 dist-bz2:
39         git archive --format=tar --prefix=$(NAME)-$(TAGVER)/ $(TAG) | \
40                 bzip2  > $(NAME)-$(TAGVER).tar.bz2
41
42 dist-gz:
43         git archive --format=tar --prefix=$(NAME)-$(TAGVER)/ $(TAG) | \
44                 gzip  > $(NAME)-$(TAGVER).tar.gz
45
46 dist: dist-bz2
47
48 clean:
49         rm -f $(TEMPLATE_MODS)
50         rm -f $(addsuffix .bak,$(TEMPLATE_MODS))
51         rm -f *.pyc *.pyo
52         rm -rf dist/ build/ kickstart/kickstart.py kickstart/__init__.py *~ */*~
53         rm -rf *.egg-info/