forked from jelix/jelix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
102 lines (87 loc) · 3.31 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
SHELL=/bin/sh
ifdef PHPPATH
PHP=$(PHPPATH)
else
PHP=/usr/bin/php
endif
CURRENT_PATH = $(shell pwd)
ifdef DISTPATH
DISTPATHSWITCH="MAIN_TARGET_PATH=$(DISTPATH)"
else
DISTPATH=_dist
DISTPATHSWITCH="MAIN_TARGET_PATH=_dist"
endif
ifdef TESTPATH
TESTPATHSWITCH="MAIN_TARGET_PATH=$(TESTPATH)"
else
TESTPATH=_dev
TESTPATHSWITCH="MAIN_TARGET_PATH=_dev"
endif
ifndef DOCSPATH
DOCSPATH=_docs
endif
ifndef TESTS_PROFILES
TESTS_PROFILES=testapp/var/config/profiles.ini.php.dist
endif
ifndef PHPDOC
PHPDOC=../../phpdoc/
endif
ifndef PHPUNIT
PHPUNIT=phpunit
endif
PHPUNITLOG=${CURRENT_PATH}/${TESTPATH}/temp/tests-phpunit.output.xml
PHPUNITDOXDIR=${CURRENT_PATH}/${TESTPATH}/temp/testdox/
PHPUNITDOX=${PHPUNITDOXDIR}/tests-phpunit.dox.html
PHPUNITCLOVER=${CURRENT_PATH}/${TESTPATH}/temp/tests-phpunit.clover.xml
PHPUNITCOVERAGE=${CURRENT_PATH}/${TESTPATH}/temp/coverage/
ifdef XUNIT_OUTPUT
SIMPLETEST_OUTPUT=--junitoutput
BUILDTESTLOG=> ${CURRENT_PATH}/${TESTPATH}/temp/tests-output.xml
else
SIMPLETEST_OUTPUT=
BUILDTESTLOG=
endif
default:
@echo "target:"
@echo " nightlies : "
@echo " générations des packages des nightly build"
@echo " docs : "
@echo " Génération de la doc"
@echo "paramètres facultatifs (valeurs actuelles) :"
@echo " DISTPATH : repertoire cible pour les distributions (" $(DISTPATH) ")"
@echo " TESTPATH : repertoire cible pour developper (" $(TESTPATH) ")"
nightlies:
$(PHP) build/buildjelix.php -D $(DISTPATHSWITCH) ./build/config/jelix-dist-dev.ini
mv $(DISTPATH)/PACKAGE_NAME $(DISTPATH)/PACKAGE_NAME_DEV
$(PHP) build/buildjelix.php -D $(DISTPATHSWITCH) ./build/config/jelix-dist-opt.ini
mv $(DISTPATH)/PACKAGE_NAME $(DISTPATH)/PACKAGE_NAME_OPT
$(PHP) build/buildjelix.php -D $(DISTPATHSWITCH) ./build/config/jelix-dist-gold.ini
mv $(DISTPATH)/PACKAGE_NAME $(DISTPATH)/PACKAGE_NAME_GOLD
$(PHP) build/buildapp.php -D $(DISTPATHSWITCH) ./build/config/testapp-dist.ini
$(PHP) build/buildjbt.php -D $(DISTPATHSWITCH) ./build/config/jbt-dist.ini
$(PHP) build/buildjtpl.php -D $(DISTPATHSWITCH) ./build/config/jtpl-dist.ini
$(PHP) build/buildmodules.php -D $(DISTPATHSWITCH) ./build/config/modules-dist.ini
preparetestapp:
$(PHP) build/buildjelix.php -D $(TESTPATHSWITCH) ./build/config/jelix-test.ini
$(PHP) build/buildapp.php -D $(TESTPATHSWITCH) ./build/config/testapp-test.ini
cd $(TESTPATH) \
&& cp $(TESTS_PROFILES) testapp/var/config/profiles.ini.php
cd $(TESTPATH)/testapp/install && $(PHP) installer.php
phpunit:
mkdir -p ${PHPUNITCOVERAGE} ${PHPUNITDOXDIR}
cd $(TESTPATH)/testapp/tests-jelix/ && $(PHPUNIT) --testdox --log-junit ${PHPUNITLOG} --testdox-html ${PHPUNITDOX} --coverage-clover ${PHPUNITCLOVER} --coverage-html ${PHPUNITCOVERAGE}
simpletest:
cd $(TESTPATH)/testapp/scripts/ && $(PHP) tests.php default:index ${SIMPLETEST_OUTPUT} ${BUILDTESTLOG}
runtests: phpunit simpletest
echo "phpunit and simpletest run"
tests: preparetestapp runtests
echo "Tests complete"
docs:
$(PHP) build/buildjelix.php -D $(TESTPATHSWITCH) ./build/config/jelix-test.ini
# cp -R -f build/phpdoc/Converters/HTML/frames $(PHPDOC)phpDocumentor/Converters/HTML/
$(PHPDOC)phpdoc \
-d $(TESTPATH)/lib/jelix/ \
-t $(DOCSPATH) \
-o "HTML:frames:DOM/jelix" -s on -ct "contributor,licence" -i *.ini.php \
-ti "Jelix API Reference" -ric "README,INSTALL,CHANGELOG,CREDITS,LICENCE,VERSION,BUILD"
# -tb $(CURRENT_PATH)/build/phpdoc/