Skip to content

Commit da9c169

Browse files
committed
More cleanup in Makefiles
1 parent c47da8a commit da9c169

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

Makefile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,36 @@
1-
RESET_COLOR=\033[0m
2-
GREEN_COLOR=\033[32;01m
31

4-
CONTAINER_NAME := 'splunk'
2+
CONTAINER_NAME := "splunk"
53

64
.PHONY: docs
75
docs:
8-
@echo "$(GREEN_COLOR)==> docs $(RESET_COLOR)"
9-
@rm -rf ./docs/_build
106
@make -C ./docs html
11-
@echo "$(GREEN_COLOR)==> Docs pages can be found at docs/_build/html"
12-
@echo "$(GREEN_COLOR)==> Docs bundle available at docs/_build/docs_html.zip"
137

148
.PHONY: test
159
test:
16-
@echo "$(GREEN_COLOR)==> test $(RESET_COLOR)"
1710
@python -m pytest ./tests
1811

1912
.PHONY: test-unit
2013
test-unit:
21-
@echo "$(GREEN_COLOR)==> test $(RESET_COLOR)"
2214
@python -m pytest ./tests/unit
2315

2416
.PHONY: test-integration
2517
test-integration:
26-
@echo "$(GREEN_COLOR)==> test $(RESET_COLOR)"
2718
@python -m pytest ./tests/integration ./tests/system
2819

2920
.PHONY: docker-up
3021
docker-up:
31-
@echo "$(GREEN_COLOR)==> up $(RESET_COLOR)"
3222
@docker-compose up -d
3323

3424
.PHONY: docker-remove
3525
docker-remove:
36-
@echo "$(GREEN_COLOR)==> rm $(RESET_COLOR)"
3726
@docker-compose rm -f -s
3827

3928
.PHONY: docker-ensure-up
4029
docker-ensure-up:
41-
@echo "$(GREEN_COLOR)==> wait-up $(RESET_COLOR)"
4230
@for i in `seq 0 180`; do if docker exec -it $(CONTAINER_NAME) /sbin/checkstate.sh &> /dev/null; then break; fi; printf "\rWaiting for Splunk for %s seconds..." $$i; sleep 1; done
4331

4432
.PHONY: docker-down
4533
docker-down:
46-
@echo "$(GREEN_COLOR)==> down $(RESET_COLOR)"
4734
@docker-compose stop
4835

4936
.PHONY: docker-start
@@ -53,4 +40,4 @@ docker-start: docker-up docker-ensure-up
5340
docker-restart: docker-down docker-start
5441

5542
.PHONY: docker-refresh
56-
docker-refresh: docker-remove docker-start
43+
docker-refresh: docker-remove docker-start

docs/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
65
SPHINXBUILD = sphinx-build
7-
BUILDDIR = _build
6+
BUILDDIR = ./_build
7+
HTMLDIR = ${BUILDDIR}/html
88

99
# Internal variables.
10-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
10+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees .
1111

1212
.PHONY: html
1313
html:
14-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
15-
sh munge_links.sh $(BUILDDIR)/html
14+
@rm -rf $(BUILDDIR)
15+
@$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
16+
@sh munge_links.sh $(HTMLDIR)
1617
@echo
17-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
18+
@echo "Build finished. HTML pages available at docs/$(HTMLDIR)."

0 commit comments

Comments
 (0)