Skip to content

Commit

Permalink
WIP: use a common build/ dir for temp dirs in make man and other ta…
Browse files Browse the repository at this point in the history
…rgets
  • Loading branch information
apjanke committed Dec 1, 2024
1 parent 29ae85c commit 75d69c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# cowsay-specific stuff to exclude

# (nothing here currently)
build/

# Local artifacts and output files and the like

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ all:

.PHONY: clean
clean:
@echo "Nothing to do - 'make clean' is a no-op."
rm -rf build

# The 'man' target creates cowsay.1, cowthink.1, and other man pages.
#
Expand All @@ -75,7 +75,8 @@ man: man/man1/cowsay.1
# than just irrelevant metadata.
man/man1/cowsay.1: man-src/man1/cowsay.1.adoc man-src/normalize-manpage.sed
@set -e; \
tmpdir="tmp$$$$"; \
if ! test -d build; then mkdir build; fi; \
tmpdir="build/tmp$$$$"; \
if $(ASCIIDOCTOR) -b manpage -D "$$tmpdir/man/man1" man-src/man1/cowsay.1.adoc; then \
sed -f man-src/normalize-manpage.sed man/man1/cowsay.1 > "$$tmpdir/man/man1/normalized-old-cowsay.1"; \
sed -f man-src/normalize-manpage.sed "$$tmpdir/man/man1/cowsay.1" > "$$tmpdir/man/man1/normalized-new-cowsay.1"; \
Expand Down

0 comments on commit 75d69c3

Please sign in to comment.