diff --git a/.gitignore b/.gitignore index 4031de4..cb42f4f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ # cowsay-specific stuff to exclude -# (nothing here currently) +build/ # Local artifacts and output files and the like diff --git a/Makefile b/Makefile index 43d9f61..fcfe805 100644 --- a/Makefile +++ b/Makefile @@ -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. # @@ -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"; \