forked from jelix/jelix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (46 loc) · 1.42 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
SHELL=/bin/sh
ifdef PHPPATH
PHP=$(PHPPATH)
else
PHP=/usr/bin/php
endif
CURRENT_PATH = $(shell pwd)
ifndef DISTPATH
DISTPATH=$(CURRENT_PATH)/_dist
endif
DISTPATHSWITCH="MAIN_TARGET_PATH=$(DISTPATH)"
ifndef DOCSTARGETPATH
DOCSTARGETPATH=$(CURRENT_PATH)/_docs
endif
ifndef DOCSCACHEPATH
DOCSCACHEPATH=$(CURRENT_PATH)/_docs.cache
endif
ifdef TESTPATH
TESTPATHSWITCH="MAIN_TARGET_PATH=$(TESTPATH)"
else
TESTPATH=_dev
TESTPATHSWITCH="MAIN_TARGET_PATH=_dev"
endif
ifndef PHPDOC
PHPDOC=phpdoc
endif
.PHONY: default
default:
@echo "target:"
@echo " nightlies : "
@echo " générations des packages des nightly build"
@echo " docs : "
@echo " Génération de la doc"
.PHONY: nightlies
nightlies:
composer install --prefer-dist --no-ansi --no-interaction --ignore-platform-reqs --no-suggest --no-progress
$(PHP) build/buildjelix.php -D $(DISTPATHSWITCH) -D IS_NIGHTLY=1 -D ENABLE_DEVELOPER=1 ./build/config/jelix-dist.ini
.PHONY: docs
docs:
$(PHP) build/buildjelix.php -D $(TESTPATHSWITCH) ./build/config/jelix-test.ini
composer install --working-dir $(TESTPATH) --prefer-dist --no-ansi --no-interaction --ignore-platform-reqs --no-suggest --no-progress
cp build/phpdoc/phpdoc.xml $(TESTPATH)
sed -i -- s!__PARSER_CACHE__!$(DOCSCACHEPATH)!g $(TESTPATH)/phpdoc.xml
sed -i -- s!__TARGET_PATH__!$(DOCSTARGETPATH)!g $(TESTPATH)/phpdoc.xml
(cd $(TESTPATH) && $(PHPDOC) project:run)
cp build/phpdoc/template.css $(DOCSTARGETPATH)/css/