From 69c2296d510753e6df350c2860d3fd4ae0ef4bf1 Mon Sep 17 00:00:00 2001 From: Marcus Jaschen Date: Fri, 7 Apr 2017 15:41:36 +0200 Subject: [PATCH] Add some tweaks to the Makefile to make it behave more like a Makefile ;-) - use Make variables - remove empty target file in case of an error (the target file is created by the shell redirection before `mandoc` runs) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 95fe60c..529abc0 100644 --- a/Makefile +++ b/Makefile @@ -2,5 +2,5 @@ src=hostmux.mandoc tgt=man/hostmux.1 $(tgt): $(src) - mkdir -p $(shell dirname $(tgt)) - mandoc -I os=sh -Tman $(src) > $(tgt) + mkdir -p $(shell dirname $@) + mandoc -I os=sh -Tman $< > $@ || { rm -f $@ ; exit 2 ; }