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/|/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 #################### manage static contents (extract from all the modules into the single all-static location)
29 ./manage.py collectstatic --noinput
34 allst: clean-static static
36 #################### sync : push current code on a (devel) box running myslice
37 SSHURL:=root@$(MYSLICEBOX):/
38 SSHCOMMAND:=ssh root@$(MYSLICEBOX)
41 # the config file should probably not be overridden ??
42 # --exclude settings.py
43 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude devel --exclude DataTables-1.9.4
45 RSYNC_EXCLUDES := --exclude .git --exclude '*~' --exclude TAGS --exclude .DS_Store $(LOCAL_RSYNC_EXCLUDES)
46 # make -n will propagate as rsync -n
47 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
49 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
51 # xxx until we come up with a packaging this is going to be a wild guess
52 #INSTALLED=/usr/share/myslice
53 INSTALLED=/root/myslice
57 @echo "you need to set MYSLICEBOX, like in e.g."
58 @echo " $(MAKE) MYSLICEBOX=debian04.pl.sophia.inria.fr "$@""
61 +$(RSYNC) ./ $(SSHURL)/$(INSTALLED)/
64 # xxx likewise until we run this under apache it's probably hard to restart from here
67 @echo "you need to set MYSLICEBOX, like in e.g."
68 @echo " $(MAKE) MYSLICEBOX=debian04.pl.sophia.inria.fr "$@""
71 @echo "$@" target not yet implemented - for an apache based depl it would read ...; exit; @$(SSHCOMMAND) /etc/init.d/apache2 restart