Skip to content

Commit 4b10d09

Browse files
committed
Clean up/improve Makefile
- remove broken targets: 'bigpage', 'epub' - make 'html' target working again - update 'help' target "text" - remove now unneeded targets: 'clean-build', 'remove-build' - introduce 'clean-cache' target - make 'distclean' target more thorough - remove references to long gone target 'html-nohighlight' - tentatively add dependencies to 'for-documentable' target hence make 'html' target depends on it - avoid forking to set SELINUX_OPT - remove unused variables: LANG_POD6_SOURCE, USE_CATEGORIES XXX util/travis-test.sh references long gone targets as well as a target removed by this commit... It probably needs some attention
1 parent a7dfb8a commit 4b10d09

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

Makefile

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,31 @@ PATH := $(PATH)
33
DOCKER_IMAGE_NAME ?= p6doc
44
DOCKER_HOST_PORT ?= 3000
55
DOCKER_SELINUX_LABEL ?= 0
6-
COLON_Z := :Z
7-
SELINUX_OPT := $(shell [ $(DOCKER_SELINUX_LABEL) -eq 1 ] && echo "$(COLON_Z)" || echo '' )
8-
# dependencies for a new doc/Language build:
9-
LANG_POD6_SOURCE := $(wildcard doc/Language/*.pod6)
10-
# Managing of the language index page
11-
USE_CATEGORIES := True
12-
13-
.PHONY: html init-highlights html-nohighlight assets \
14-
bigpage test xtest ctest help run clean-html clean-images \
6+
ifeq ($(DOCKER_SELINUX_LABEL),1)
7+
SELINUX_OPT := :Z
8+
else
9+
SELINUX_OPT :=
10+
endif
11+
12+
.PHONY: html init-highlights assets \
13+
test xtest ctest help run clean-html clean-images \
1514
clean-search clean test-links push \
16-
clean-build \
15+
clean-cache \
1716
docker-image docker-test docker-xtest docker-ctest docker-testall docker-run
1817

19-
html: bigpage
18+
html: for-documentable
19+
documentable start -a -v --highlight
2020

21-
init-highlights:
21+
init-highlights highlights/package-lock.json:
2222
ATOMDIR="./highlights/atom-language-perl6"; \
2323
if [ -d "$$ATOMDIR" ]; then (cd "$$ATOMDIR" && git pull); \
2424
else git clone https://github.com/perl6/atom-language-perl6 "$$ATOMDIR"; \
2525
fi; cd highlights; npm install .; npm rebuild
2626

27-
assets:
27+
assets assets/assetpack.db:
2828
./app.pl assets
2929

30-
for-documentable: init-highlights assets
31-
32-
bigpage:
33-
pod2onepage --html -v --source-path=./build --exclude=404.pod6 > html/perl6.html
34-
35-
epub: bigpage
36-
pandoc html/perl6.html -o perl6.epub
30+
for-documentable: highlights/package-lock.json assets/assetpack.db
3731

3832
# Common tests that are run by travis with every commit
3933
test:
@@ -48,13 +42,11 @@ ctest:
4842
prove --exec perl6 -r t/07-tabs.t xt/perl-nbsp.t xt/trailing-whitespace.t
4943

5044
help:
51-
@echo "Usage: make [html|html-nohighlight|test|xtest|ctest]"
45+
@echo "Usage: make [html|test|xtest|ctest]"
5246
@echo ""
5347
@echo "Options:"
5448
@echo " html: generate the HTML documentation"
55-
@echo " html-nohighlight: generate HTML documentation without syntax highlighting"
5649
@echo " assets: generate CSS/JS assets"
57-
@echo "bigpage: generate HTML documentation in one large file (html/perl6.html)"
5850
@echo "init-highlights: install prereqs for highlights (runs as part of 'make html')"
5951
@echo " test: run the test suite"
6052
@echo " xtest: run the test suite, including extra tests"
@@ -112,15 +104,18 @@ clean-images:
112104
clean-search:
113105
rm -f html/js/search.js
114106

115-
clean-build:
116-
find build -name "*.pod6" -exec rm -f {} \;
117-
118-
remove-build:
119-
rm -rf build
107+
clean-cache:
108+
-rm -rf .cache-doc
120109

121-
clean: clean-html clean-images clean-search clean-build
110+
clean: clean-html clean-images clean-search
122111

123-
distclean: clean remove-build
112+
distclean: clean clean-cache
113+
-rm -rf assets/assetpack.db assets/cache
114+
-rm -rf highlights/atom-language-perl6/
115+
-rm -rf highlights/node_modules/
116+
-rm -rf highlights/package-lock.json
117+
-rm -rf html/css/app.css
118+
-rm -rf html/js
124119

125120

126121
test-links: links.txt

0 commit comments

Comments
 (0)