summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 8f5ae5b4853fb4cd787775b97fe23219eff210c7 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
prefix = @prefix@
srcdir = @srcdir@

script_templates = taler-merchant-survey frontend-survey.wsgi
templates = Makefile $(script_templates)

edit = sed -e 's|@prefix[@]|$(prefix)|g'

.PHONY: all
all: $(templates)
	cd talersurvey/survey/static/web-common && make && cd -

Makefile: Makefile.in
	./config.status $@

$(script_templates): %: Makefile %.in
	rm -f $@ $@.tmp
	$(edit) '$(srcdir)/$@.in' >$@.tmp
	mv $@.tmp $@


.PHONY: install-data
install-data: $(templates)
	@$(INSTALL_DATA) -Dt $(prefix)/share/taler/ frontend-survey.wsgi

#	@test -n "$$(ls -A talerbank/app/static/web-common/)" || \
#	(echo "please check out git submodules"; exit 1)



# link package under prefix to source tree
.PHONY: devinstall
devinstall: $(templates) install-data
	@pip3 install -e . --install-option="--prefix=@prefix@"


# install into prefix
.PHONY: install
install: $(templates) install-data
	@pip3 install . @DEBIAN_PIP3_SYSTEM@ --install-option="--prefix=@prefix@"
	@# force update when sources changed
	@pip3 install . @DEBIAN_PIP3_SYSTEM@ --install-option="--prefix=@prefix@" --upgrade --no-deps
	cd talersurvey/survey/static/web-common && make install && cd -

# run testcases
.PHONY: check
check:
	@export TALER_CONFIG_FILE=@abs_srcdir@/talersurvey/tests.conf; \
	 export TALER_PREFIX=@prefix@; \
         python3 setup.py test

pylint:
	@pylint talersurvey/