-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (46 loc) · 1.9 KB
/
Makefile
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
F= files/docker/systemctl.py
B= 2016
version1:
@ grep -l __version__ */*.??* */*/*.??* | { while read f; do echo $$f; done; }
version:
@ grep -l __version__ */*.??* */*/*.??* *.py | { while read f; do : \
; Y=`date +%Y` ; X=$$(expr $$Y - $B); D=`date +%W%u` ; sed -i \
-e "/^ *__version__/s/[.]-*[0123456789][0123456789][0123456789]*\"/.$$X$$D\"/" \
-e "/^ *__version__/s/[.]\\([0123456789]\\)\"/.\\1.$$X$$D\"/" \
-e "/^ *__copyright__/s/(C) [0123456789]*-[0123456789]*/(C) $B-$$Y/" \
-e "/^ *__copyright__/s/(C) [0123456789]* /(C) $$Y /" \
$$f; done; }
@ grep ^__version__ files/*/*.??*
help:
python files/docker/systemctl.py help
alltests: CH CP UA DJ
.PHONY: tests
tests: alltests
CH centos-httpd.dockerfile: ; ./testsuite.py test_6001
CP centos-postgres.dockerfile: ; ./testsuite.py test_6002
UA ubuntu-apache2.dockerfile: ; ./testsuite.py test_6005
DJ docker-jenkins: ; ./testsuite.py test_900*
COVERAGE=--coverage
est_%: ; rm .coverage* ; ./testsuite.py t$@ -vv --coverage
coverage: ; rm .coverage* ; ./testsuite.py -vv --coverage test_1 test_2 test_3 test_4 test_6
check: ; rm .coverage* ; ./testsuite.py -vv --coverage
test_%: ; ./testsuite.py $@ -vv
st_%:
$(MAKE) tmp/systemctl.py
rm .coverage* ; ./testsuite.py -vv --coverage te$@ \
'--with=tmp/systemctl.py' --python=/usr/bin/python3
check3:
$(MAKE) tmp/systemctl.py
rm .coverage* ; ./testsuite.py -vv --coverage \
'--with=tmp/systemctl.py' --python=/usr/bin/python3
coverage3:
$(MAKE) tmp/systemctl.py
rm .coverage* ; ./testsuite.py -vv --coverage test_1 test_2 test_3 test_4 test_6 \
'--with=tmp/systemctl.py' --python=/usr/bin/python3
tmp/systemctl.py : files/docker/systemctl.py
test -d tmp || mkdir tmp
cp files/docker/systemctl.py tmp/systemctl.py
sed -i -e "s|/usr/bin/python|/usr/bin/python3|" tmp/systemctl.py
op opensuse: ; ./testsuite.py make_opensuse
ub ubuntu: ; ./testsuite.py make_ubuntu
ce centos: ; ./testsuite.py make_centos