diff options
author | Teddy Wing | 2018-03-03 18:26:00 +0100 |
---|---|---|
committer | Teddy Wing | 2018-03-03 18:26:00 +0100 |
commit | 517f9c6ec992212576aaef7b510486650dd99f50 (patch) | |
tree | 74ced33a5744c9225233b86f051a06e0b664acde | |
parent | af1720c73402fbac95ce05a03acf153fdbf404b3 (diff) | |
download | Passextract-517f9c6ec992212576aaef7b510486650dd99f50.tar.bz2 |
Makefile: Clean up man page bold literal transformation
Instead of the messy variables we were using, which caused
`passextract.1.txt.tmp` and `passextract.1` files to be generated at the
root of the project, create a few new targets to do the "`"` to "*"
transformation and build the man page from a temporary file.
-rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1,7 +1,14 @@ -MAN_PAGE := doc/passextract.1.txt -TRANSFORMED_MAN_PAGE := $(patsubst %,%.tmp,$(MAN_PAGE)) +TRANSFORMED_MAN_PAGE := doc/passextract.1.transformed -doc/passextract.1: doc/passextract.1.txt - sed 's/`/*/g' $< > $(TRANSFORMED_MAN_PAGE) && \ - a2x --no-xmllint --format manpage $(TRANSFORMED_MAN_PAGE) && \ +$(TRANSFORMED_MAN_PAGE): doc/passextract.1.txt + sed 's/`/*/g' $< > $@ + +clean_transformed: rm $(TRANSFORMED_MAN_PAGE) + +doc/passextract.1: $(TRANSFORMED_MAN_PAGE) + a2x --no-xmllint --format manpage $< + +doc: doc/passextract.1 clean_transformed + +.PHONY: clean_transformed doc |