3 @echo no default target
7 #################### compute emacs tags
8 # list files under git but exclude third-party stuff like bootstrap and jquery
10 @git ls-files | egrep -v 'insert(_|-)above|/bootstrap.*[0-9]|/jquery/|datatables/'
12 # in general it's right to rely on the contents as reported by git
14 $(MAKE) myfiles | xargs etags
16 # however sometimes we have stuff not yet added, so in this case
18 find . -type f | fgrep -v '/.git/' | xargs etags
21 @find . -type f -name '*.html'
23 @find . -type f -name '*.js' | grep -v '/all-static/'
25 @find . -type f -name '*.css' | grep -v '/all-static/'
27 @find . -type f -name '*.png' | grep -v '/all-static/'
29 list-all list-resources: list-html list-js list-css list-img
31 #################### manage static contents (extract from all the modules into the single all-static location)
33 ./manage.py collectstatic --noinput
38 allst: clean-static static
40 #################### sync : push current code on a (devel) box running myslice
41 SSHURL:=root@$(MYSLICEBOX):/
42 SSHCOMMAND:=ssh root@$(MYSLICEBOX)
45 # the config file should probably not be overridden ??
46 # --exclude settings.py
47 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude devel --exclude DataTables-1.9.4 --exclude all-static --exclude '*.sqlite3'
49 RSYNC_EXCLUDES := --exclude .git --exclude '*~' --exclude TAGS --exclude .DS_Store $(LOCAL_RSYNC_EXCLUDES)
50 # make -n will propagate as rsync -n
51 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
53 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
55 # xxx until we come up with a packaging this is going to be a wild guess
56 #INSTALLED=/usr/share/myslice
57 INSTALLED=/root/myslice
61 @echo "you need to set MYSLICEBOX, like in e.g."
62 @echo " $(MAKE) MYSLICEBOX=debian04.pl.sophia.inria.fr "$@""
65 +$(RSYNC) ./ $(SSHURL)/$(INSTALLED)/
68 # xxx likewise until we run this under apache it's probably hard to restart from here
71 @echo "you need to set MYSLICEBOX, like in e.g."
72 @echo " $(MAKE) MYSLICEBOX=debian04.pl.sophia.inria.fr "$@""
75 @echo "$@" target not yet implemented - for an apache based depl it would read ...; exit; @$(SSHCOMMAND) /etc/init.d/apache2 restart