]> git.donarmstrong.com Git - neurodebian.git/blob - Makefile
oopsy -- fixing what should have not been committed
[neurodebian.git] / Makefile
1 #WWW_UPLOAD_URI = neuro.debian.net:/home/www/neuro.debian.net/www
2 WWW_UPLOAD_URI = ../www
3 WWW_DIR = build/html/
4
5 all: updatedb upload-website
6
7
8 pics:
9         $(MAKE) -C artwork
10
11
12 html: pics source
13         rsync -rvlhp sphinx/ build/src
14         cd artwork;     cp button_w200.png logo_tuned/fmri_w200.png ../build/src/_static; cd ..
15         cp 3rd/jquery.livetwitter/jquery.livetwitter.min.js build/src/_static
16         cd build/src && $(MAKE) html BUILDDIR=$(CURDIR)/build 2>&1
17         mv $(WWW_DIR)/_static/robots.txt $(WWW_DIR)/
18         cp -r build/src/lists $(WWW_DIR)/
19         cp -r sphinx/survey/2011/figures/* $(WWW_DIR)/_images/
20
21
22 clean:
23         -rm html-stamp source-stamp upload-website-stamp
24         $(MAKE) -C artwork clean
25
26
27 distclean: clean
28         -rm -rf build
29
30
31 source: source-stamp
32 source-stamp: build/db.db
33         PYTHONPATH=.:$(PYTHONPATH) python neurodebian/dde.py \
34                 --cfg neurodebian.cfg \
35                 --db build/db.db \
36                 --outdir build/src \
37                 --pkgaddenum pkgs \
38                 --extracts /home/www/neuro.debian.net/www/debian/extracts \
39                 commandisirrelevant
40         rm -f html-stamp
41         touch $@
42
43
44 removecache:
45         -rm -rf build/cache
46
47 removedb:
48         -rm -f build/db.db
49
50
51 updatedb: removedb removecache build/db.db
52
53
54 build/db.db:
55         mkdir -p build
56         PYTHONPATH=.:$(PYTHONPATH) python neurodebian/dde.py \
57                 --cfg neurodebian.cfg \
58                 --db build/db.db \
59                 updatedb
60         -rm -f source-stamp
61
62
63 upload-website: html
64         rsync -rvzlhp --delete \
65         --exclude=debian --exclude=debian-local --exclude=_files \
66         --chmod=Dg+s,g+rw $(WWW_DIR) $(WWW_UPLOAD_URI)
67         : # Touch stamp here so we get it updated on every upload
68         touch $@-stamp
69
70 # call upload iff .git/index was modified, i.e. new changes got pulled in
71 upload-website-stamp: .git/index
72         $(MAKE) upload-website
73
74 .PHONY: removedb removecache updatedb upload-website clean distclean pics html
75