1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00
Files
archived-doc-en/Makefile
Jim Winstead 1ef0cab7c2 Use Makefile instead of docker-compose.yml (#3673)
* Use environment variable for format to build

* Use Makefile instead of docker-compose.yml

This allows us to build different formats more easily, and use phd and
doc-base from parallel checkouts, which is much easier for issues that
span the repositories.
2024-09-03 11:02:40 -04:00

33 lines
716 B
Makefile

.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 .:/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 ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} php/doc-en
php: .docker/built
docker run ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} \
-e FORMAT=php php/doc-en
build: .docker/built
.docker/built:
docker build .docker -t php/doc-en
touch .docker/built