aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
authorBrandon Maier <brandon.maier@collins.com>2024-07-01 17:58:28 +0000
committerRobin Jarry <robin@jarry.cc>2024-07-02 22:12:45 +0200
commit00bbc188f0bd2bbec15752bce61605d5236f26c9 (patch)
treee4fa12c32c8993b151cefb40ef0e469f88d29bd1 /GNUmakefile
parent44b14ebdff0e3da8df2348eeda27bfc2ec421fbb (diff)
downloadaerc-00bbc188f0bd2bbec15752bce61605d5236f26c9.tar.gz
mk: handle stale files when scdoc fails
If scdoc fails for any reason, for example because a user hasn't installed it yet, the `> $$@` redirection will still create an empty destination file. On re-runs gmake will see the empty file and assume the target has already completed. This led to installing a blank man page. Use the GNU Make '.DELETE_ON_ERROR' special target which automatically deletes the target if a recipe fails. Link: https://www.gnu.org/software/make/manual/html_node/Special-Targets.html#index-removing-targets-on-failure Signed-off-by: Brandon Maier <brandon.maier@collins.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 6c666fdd..de1dfb52 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -208,3 +208,5 @@ $(eval $(call install_file,contrib/carddav-query,755,$(DESTDIR)$(BINDIR)))
$(sort $(dirs)):
mkdir -p $@
+
+.DELETE_ON_ERROR: