Skip to content

Commit

Permalink
Add some tweaks to the Makefile to make it behave more like a Makefil…
Browse files Browse the repository at this point in the history
…e ;-)

- use Make variables
- remove empty target file in case of an error (the target file is
  created by the shell redirection before `mandoc` runs)
  • Loading branch information
mjaschen committed Apr 7, 2017
1 parent 6a67186 commit 69c2296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ; }

0 comments on commit 69c2296

Please sign in to comment.