Skip to content

Commit

Permalink
make tabs and spaces consistent, wrap longer lines
Browse files Browse the repository at this point in the history
  • Loading branch information
akcano committed Aug 30, 2023
1 parent 94cb734 commit e8dac21
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,23 @@ $(VENVDIR): $(SPHINXDIR)/requirements.txt
@echo "... setting up virtualenv"
python3 -m venv $(VENVDIR)
. $(VENV); pip install --upgrade -r $(SPHINXDIR)/requirements.txt

@echo "\n" \
"--------------------------------------------------------------- \n" \
"* watch, build and serve the documentation: make run \n" \
"* only build: make html \n" \
"* only serve: make serve \n" \
"* clean built doc files: make clean-doc \n" \
"* clean full environment: make clean \n" \
"* check spelling: make spelling \n" \
"* check inclusive language: make woke \n" \
"* other possible targets: make <press TAB twice> \n" \
"--------------------------------------------------------------- \n"
"--------------------------------------------------------------- \n" \
"* watch, build and serve the documentation: make run \n" \
"* only build: make html \n" \
"* only serve: make serve \n" \
"* clean built doc files: make clean-doc \n" \
"* clean full environment: make clean \n" \
"* check spelling: make spelling \n" \
"* check inclusive language: make woke \n" \
"* other possible targets: make <press TAB twice> \n" \
"--------------------------------------------------------------- \n"
@touch $(VENVDIR)


woke-install:
@type woke >/dev/null 2>&1 || \
{ echo "Installing \"woke\" needs sudo \n"; sudo snap install woke; }
{ echo "Installing \"woke\" snap... \n"; sudo snap install woke; }

.PHONY: woke-install

Expand All @@ -61,13 +60,15 @@ run: install

# Doesn't depend on $(BUILDDIR) to rebuild properly at every run.
html: install
. $(VENV); $(SPHINXBUILD) -c . -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -w .sphinx/warnings.txt
. $(VENV); $(SPHINXBUILD) -c . -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" \
-w .sphinx/warnings.txt

.PHONY: html


epub: install
. $(VENV); $(SPHINXBUILD) -c . -b epub "$(SOURCEDIR)" "$(BUILDDIR)" -w .sphinx/warnings.txt
. $(VENV); $(SPHINXBUILD) -c . -b epub "$(SOURCEDIR)" "$(BUILDDIR)" \
-w .sphinx/warnings.txt

.PHONY: epub

Expand All @@ -79,9 +80,10 @@ serve: html


clean: clean-doc
@test ! -e "$(VENVDIR)" -o -d "$(VENVDIR)" -a "$(abspath $(VENVDIR))" != "$(VENVDIR)"
@test ! -e "$(VENVDIR)" -o -d "$(VENVDIR)" \
-a "$(abspath $(VENVDIR))" != "$(VENVDIR)"
rm -rf $(VENVDIR)
@{ echo "Removing \"woke\" needs sudo \n"; sudo snap remove woke; }
@{ echo "Removing \"woke\" snap... \n"; sudo snap remove woke; }

.PHONY: clean

Expand All @@ -105,14 +107,16 @@ linkcheck: install


woke: woke-install
woke *.rst **/*.rst -c https://github.com/canonical/Inclusive-naming/raw/main/config.yml
woke *.rst **/*.rst \
-c https://github.com/canonical/Inclusive-naming/raw/main/config.yml

.PHONY: woke


# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
. $(VENV); $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
. $(VENV); \
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: Makefile

0 comments on commit e8dac21

Please sign in to comment.