-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
118 lines (88 loc) · 3.58 KB
/
Makefile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.PHONY: sample_app .hgignore .gitignore clean serve symlinks
serve: git openid symlinks clean
./manage.py runserver
###############################################################################
# git submodules
###############################################################################
git:
@echo "Updating git submodules." ;\
git submodule init; \
git submodule update
openid: git
-ln -s python-openid/openid openid
###############################################################################
# Markdown parser
###############################################################################
MARKDOWN=Markdown-2.0.3
MARKDOWN_EXT=$(shell find markdown-extensions -type f -name \*.py)
# Download the tar.gz
$(MARKDOWN).tar.gz:
curl -O http://pypi.python.org/packages/source/M/Markdown/$(MARKDOWN).tar.gz
# Extract the tar.gz
$(MARKDOWN): $(MARKDOWN).tar.gz $(MARKDOWN_EXT)
tar -zxvf $(MARKDOWN).tar.gz
@# Update modtime on tar.gz to match directory so we don't continually rebuild
@touch -r $@ -m $^
for f in $(MARKDOWN_EXT); do \
cp $$f $(MARKDOWN)/markdown/extensions/; \
done
ln -sf markdown $^
# Human name target
markdown: $(MARKDOWN)
markdown-clean:
rm -rf $(MARKDOWN)*
###############################################################################
# django-nonrel, djangoappengine, and friends
###############################################################################
upstream:
mkdir upstream
upstream/django-nonrel upstream/djangoappengine upstream/djangotoolbox upstream/django-dbindexer upstream/django-testapp upstream/django-mediagenerator: BBUSER = wkornewald
upstream/django-autoload: BBUSER=twanschik
upstream/django-nonrel upstream/djangoappengine upstream/djangotoolbox upstream/django-dbindexer upstream/django-testapp upstream/django-mediagenerator upstream/django-autoload: upstream
@if test -d $@; \
then cd $@; hg pull; \
else cd upstream; hg clone https://bitbucket.org/$(BBUSER)/$(notdir $@); \
fi
upstream/django-nonrel/django: upstream/django-nonrel
django: upstream/django-nonrel/django
ln -s $^ $@
upstream/djangotoolbox/djangotoolbox: upstream/djangotoolbox
djangotoolbox: upstream/djangotoolbox/djangotoolbox
ln -s $^ $@
upstream/django-autoload/autoload: upstream/django-autoload
autoload: upstream/django-autoload/autoload
ln -s $^ $@
upstream/django-dbindexer/dbindexer: upstream/django-dbindexer
dbindexer: upstream/django-dbindexer/dbindexer
ln -s $^ $@
djangoappengine: upstream/djangoappengine
ln -s $^ $@
upstream/django-mediagenerator/mediagenerator: upstream/django-mediagenerator
mediagenerator: upstream/django-mediagenerator/mediagenerator
ln -s $^ $@
###############################################################################
# django-openid-auth
###############################################################################
OAVERSION=0.3
OPENIDAUTH=django-openid-auth-$(OAVERSION)
$(OPENIDAUTH).tar.gz:
curl -LO http://launchpad.net/django-openid-auth/trunk/$(OAVERSION)/+download/$(OPENIDAUTH).tar.gz
$(OPENIDAUTH): $(OPENIDAUTH).tar.gz
tar -zxvf $^
touch -r $@ -m $^
django_openid_auth: $(OPENIDAUTH)
ln -s $^/$@ $@
###############################################################################
symlinks: django djangotoolbox autoload dbindexer djangoappengine mediagenerator django_openid_auth openid
sample_app: upstream/django-testapp
cp -r $^/* .
.gitignore:
-rm .gitignore
find . -type l -d 1 | cut -c 3- >> .gitignore
find upstream -type d -d 1 >> .gitignore
.hgignore:
-rm .hgignore
find . -type l -d 1 | cut -c 3- >> .hgignore
find upstream -type d -d 1 >> .hgignore
clean:
find . -name \*.pyc -exec rm \{\} \;