-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 800 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 800 Bytes
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
.PHONY: *
SHELL = /bin/sh
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
#
# If doc-base or phd exist as siblings to the current directory, add those as
# volumes to our Docker runs.
#
PATHS := -v ${PWD}:/var/www/en
ifneq ($(wildcard ../doc-base/LICENSE),)
PATHS += -v ${PWD}/../doc-base:/var/www/doc-base
endif
ifneq ($(wildcard ../phd/LICENSE),)
PATHS += -v ${PWD}/../phd:/var/www/phd
endif
xhtml: .docker/built
docker run --rm ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} php/doc-en
php: .docker/built
docker run --rm ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} \
-e FORMAT=php php/doc-en
build: .docker/built
.docker/built:
docker build\
--build-arg UID=${CURRENT_UID} --build-arg GID=${CURRENT_GID}\
.docker -t php/doc-en
touch .docker/built