SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) ifneq ("$(wildcard /etc/redhat-release)","") PYTHON=PYTHONPATH=$$PYTHONPATH:/scratch/ulrich/pymule/tools/ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/psi-python27/4.4.0/bin/python -B PEP8=$(PYTHON) /afs/psi.ch/sys/psi.x86_64_slp6/Programming/psi-python27/4.4.0/bin/pep8 JUPYTERCONV=$(PYTHON) /afs/psi.ch/sys/psi.x86_64_slp6/Programming/psi-python27/4.4.0/bin/jupyter-nbconvert else PYTHON=python -B PEP8=pep8 JUPYTERCONV=jupyter nbconvert endif else endif PY2NB = $(PYTHON) $(SELF_DIR)/py2nb.py -x PEP8FLAGS=--ignore=E265,E266,W503,E121,E123,E126,E226,E24,E704,W503 .DEFAULT_GOAL=all .PHONY:check clean ci %.ipynb: %.py $(PY2NB) $< %.html: %.ipynb $(JUPYTERCONV) --to html $< $(figures): $(name).ipynb all: $(name).html $(figures) clean: rm -rf *.ipynb *.pdf *.png *.html *.tex *.pgf *.pyc .ipynb_checkpoints check: @res=$$(find . -name "*.py" -exec $(PEP8) $(PEP8FLAGS) {} \;) ; \ if [ -n "$$res" ]; then echo "$$res" ; fi ci: all mkdir -p $(SELF_DIR)/../ci/$(group)/$(name)/ cp $(name).html $(name).ipynb $(figures) $(SELF_DIR)/../ci/$(group)/$(name)