Makefile 1.56 KB
Newer Older
1
PHPDOC ?= support/pear/phpdoc
2
JSDOC ?= jsdoc
3
PKG_VERSION = $(shell awk '/version/ { print $$3 }' extension/ext_emconf.php  | sed "s/'//g")
4
5
NIGHTLY_DATE = $(shell date '+%Y%m%d')
EXTENSION_CONTENT = Classes Configuration qfq Resources ext_emconf.php ext_localconf.php ext_tables.php config.example.ini
6

Carsten  Rose's avatar
Carsten Rose committed
7
all: archive t3sphinx
8

Carsten  Rose's avatar
Carsten Rose committed
9
doc: phpdoc jsdoc
Carsten  Rose's avatar
Carsten Rose committed
10
11
12

t3sphinx:
	cd extension/Documentation/_make; make html
13

14
15
16
support:
	mkdir support

17
bootstrap: .phpdocinstall .npmpackages .bowerpackages
18
19
20
	npm install
	bower install
	grunt default
21

22
23
24
jsdoc: .npmpackages
	$(JSDOC) -c JSDocConf.json

25
26
27
28
29
30
31
32
phpdoc: .phpdocinstall
	$(PHPDOC)

.phpdocinstall: support
	pear config-create "`pwd`/support" "`pwd`/support/pear.config"
	pear -c "`pwd`/support/pear.config" channel-discover pear.phpdoc.org
	pear -c "`pwd`/support/pear.config" install phpdoc/phpDocumentor
	touch $@
33
34
35
36
37
38
39
40
41
42
43

.npmpackages: package.json
	npm ls -g grunt-cli 2>/dev/null || { echo "Please install grunt-cli npm package using 'npm install -g grunt-cli'" 1>&2 ; exit 1; }
	npm ls -g jsdoc 2>/dev/null || { echo "Please install jsdoc npm package using 'npm install -g jsdoc'" 1>&2 ; exit 1; }
	npm ls -g bower 2>/dev/null || { echo "Please install bower npm package using 'npm install -g bower'" 1>&2 ; exit 1; }
	npm install
	touch $@

.bowerpackages: bower.json
	bower --silent install
	touch $@
44
45
46
47


archive: clean qfq_$(PKG_VERSION).zip

48
49
qfq_$(PKG_VERSION).zip:  
	cd extension; zip -r ../$@ $(EXTENSION_CONTENT)
50
51
52

clean:
	rm -f qfq_$(PKG_VERSION).zip
53
54
55
56
57
58

nightly: 
	rm -f qfq_????????.zip
	cd extension; zip -r ../qfq_$(NIGHTLY_DATE) $(EXTENSION_CONTENT)

.PHONY: nightly