File: rules

package info (click to toggle)
python-expyriment 0.7.0%2Bgit34-g55a4e7e-3.2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,504 kB
  • ctags: 2,094
  • sloc: python: 12,766; makefile: 150
file content (44 lines) | stat: -rwxr-xr-x 1,221 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

CLI_SCRIPT=bin/expyriment-cli

override_dh_auto_build: $(CLI_SCRIPT) manpage
	make --directory=documentation/sphinx rst html latexpdf
	#make --directory=documentation/api html
	rm -f documentation/sphinx/_build/html/_static/jquery.js 
	rm -f documentation/sphinx/_build/html/_static/underscore.js
	dh_auto_build

override_dh_install:
	dh_install

override_dh_clean:
	make --directory=documentation/sphinx clean
	make --directory=documentation/api clean
	rm -rf bin man
	rm documentation/api/_build -rf
	dh_clean

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.md

override_dh_compress:
	dh_compress -X.py -X.pdf

$(CLI_SCRIPT):
	mkdir -p bin
	echo "#!/bin/sh" > $(CLI_SCRIPT)
	echo "set -e" >> $(CLI_SCRIPT)
	echo -n "python -m expyriment.cli \$$* |" >> $(CLI_SCRIPT) 
	echo "sed 's/ python -m expyriment.cli / expyriment-cli /g'" >> $(CLI_SCRIPT)
	chmod 755 $(CLI_SCRIPT)

manpage: $(CLI_SCRIPT)
	mkdir -p man
	help2man --no-info --name="command line interface for Expyriment, a Python library for cognitive and neuroscientific experiments" $(CLI_SCRIPT) > man/expyriment-cli.1

%:
	dh $@ --with python2