-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (54 loc) · 1.48 KB
/
Makefile
File metadata and controls
60 lines (54 loc) · 1.48 KB
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
PHD_REPO=https://github.com/php/phd.git
DOC_BASE_REPO=https://github.com/php/doc-base.git
DOC_EN_REPO=https://github.com/php/doc-en.git
DOC_JA_REPO=https://github.com/php/doc-ja.git
OUTPUT_DIR=output/php-chunked-xhtml
setup:
@if [ ! -d "phd" ]; then \
echo "Cloning phd..."; \
git clone $(PHD_REPO); \
else \
echo "phd already cloned."; \
fi
@if [ ! -d "doc-base" ]; then \
echo "Cloning doc-base..."; \
git clone $(DOC_BASE_REPO); \
else \
echo "doc-base already cloned."; \
fi
@if [ ! -d "en" ]; then \
echo "Cloning doc-en..."; \
git clone $(DOC_EN_REPO) en; \
else \
echo "doc-en already cloned."; \
fi
@if [ ! -d "ja" ]; then \
echo "Cloning doc-ja..."; \
git clone $(DOC_JA_REPO) ja; \
else \
echo "doc-ja already cloned."; \
fi
destroy:
@echo "Removing phd, doc-base, en, and ja directories..."
rm -rf phd doc-base en ja
@echo "Removing output directory..."
rm -rf $(OUTPUT_DIR)
@echo "Cleanup complete."
build:
php doc-base/configure.php --with-lang=ja
xhtml:
php phd/render.php --docbook doc-base/.manual.xml --package PHP --format xhtml
open:
@if [ -f output/php-chunked-xhtml/index.html ]; then \
open output/php-chunked-xhtml/index.html; \
else \
echo "Output file not found: output/php-chunked-xhtml/index.html"; \
fi
open-modified:
@PATHS=$$(php bin/getModifiedFilePath.php); \
if [ -n "$$PATHS" ]; then \
echo "Opening: $$PATHS"; \
open $$PATHS || echo "Failed to open the file(s)."; \
else \
echo "Modified file not found."; \
fi