X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=31ee234baea84cfee8e1d81175c257d023e97f33;hb=fea9b7e286cc86f11844e371d67d184198afc287;hp=49935483eb3342e25ecab81b1e8be269d2e7f06b;hpb=9a62ec0dc3ee3e859f3563da29d9c838a658b140;p=myslice.git diff --git a/Makefile b/Makefile index 49935483..31ee234b 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,15 @@ SHELL = /bin/bash MAKE-SILENT = $(MAKE) --no-print-directory -### first purpose, build and install from setup.py -all: build - -force: +all: static templates # clean up and recompute -redo: redo-static redo-templates +redo: clean-oldies redo-static redo-templates + +clean-oldies: + rm -rf all-static all-templates django-static + +force: DESTDIR := / datadir := /usr/share @@ -26,10 +28,14 @@ install: --install-scripts=$(DESTDIR)/$(datadir)/unfold \ --install-data=$(DESTDIR)/$(datadir)/unfold -redo-static static: force - rm -rf static/ +static: force ./manage.py collectstatic --noinput +clean-static: + rm -rf static/ + +redo-static: clean-static static + #################### # general stuff DATE=$(shell date -u +"%a, %d %b %Y %T") @@ -131,22 +137,10 @@ debian.clean: plugins-templates: force @find plugins -type f -name '*.html' local-templates: force - @$(foreach tmpl,$(shell find . -name templates),ls -1 $(tmpl)/*;) + @$(foreach tmpl,$(shell find . -name templates | grep -v '^\./templates$$'),ls -1 $(tmpl)/*;) list-templates: plugins-templates local-templates -### #################### manage static contents (extract from all the modules into the single all-static location) -### static run-static static-run: force -### mkdir -p ./all-static/js all-static/css all-static/img -### ln -sf $(foreach x,$(shell $(MAKE-SILENT) list-js),../../$(x)) ./all-static/js -### ln -sf $(foreach x,$(shell $(MAKE-SILENT) list-css),../../$(x)) ./all-static/css -### ln -sf $(foreach x,$(shell $(MAKE-SILENT) list-img),../../$(x)) ./all-static/img -### -### clean-static static-clean: force -### rm -rf ./all-static -### -### all-static: clean-static run-static - #################### manage templates for the plugin area templates: force mkdir -p templates