-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
88 lines (74 loc) · 1.96 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
########################################################################
##
## Grima developer tools
##
## "make doxygen" will translate comments in the code into webpages in
## docs/dev
##
## "make jekyll" will translate documentation in .md (markdown) format
## to html in dist/
##
## "make tgz" will create a tgz archive of dist/ suitable for releasing on
## github.
##
all: release
release: doxygen jekyll tgz
tgz: doxygen jekyll
mkdir -p releases
TAGNAME=$$(git describe --dirty --tags) ; \
mv dist "grima-$$TAGNAME" && \
tar -zcf "releases/grima-$$TAGNAME.tgz" "grima-$$TAGNAME" && \
mv "grima-$$TAGNAME" dist
phar:
cd dist && php -d phar.readonly=0 CreatePhar.php
.bundle/vendor/bundle:
bundle install --path .bundle/vendor/bundle
node_modules:
npm install
jekyll: | .bundle/vendor/bundle node_modules
bundle exec jekyll b
rm -f dist/.htaccess
chmod og+rX -R dist
node fix_urls.js 2>/dev/null
mv dist/index.html dist/README-github.html
mv dist/README.md dist/README-github.md
mv dist/README-site.html dist/index.html
mv dist/README-site.md dist/README.md
doxygen:
rm -rf docs/dev
mkdir -p docs/dev
doxygen > docs/dev/doxygen.log 2>&1
########################################################################
##
## Local testing
##
## "make local" will run a small php server (on unix like systems)
## Connect to http://127.0.0.1:32900/ to see it.
##
## If you have docker installed,
## "make php72" will run php 7.2 on http://127.0.0.1:32972/
## "make php56" will run php 5.6 on http://127.0.0.1:32956/
##
export DATABASE_URL=sqlite:$(PWD)/standalone-config.sql
HOST=127.0.0.1
php72:IMAGE=php:7.2
php71:IMAGE=php:7.1
php70:IMAGE=php:7.0
php56:IMAGE=php:5.6
php55:IMAGE=php:5.5
php54:IMAGE=php:5.4
local:PORT=32900
local:
php -S $(HOST):$(PORT)
php%:PORT=329$*
php%:
docker run \
--user $$(id -u) \
--workdir /work \
--volume $(PWD):/work \
--publish $(PORT):$(PORT) \
--expose $(PORT) \
-it \
--rm \
$(IMAGE) \
php -S $(HOST):$(PORT)