From 56de841f4517c3c339e8428f2d1293437bfbb756 Mon Sep 17 00:00:00 2001 From: Ambrose Li Date: Tue, 14 May 2024 04:24:53 -0400 Subject: [PATCH] Make sure "all" is the default target. Try to not clobber existing man page and html file if xmltoman/xsltproc fails/does not exist --- man/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/man/Makefile b/man/Makefile index 53cceef8..cf52c5ab 100644 --- a/man/Makefile +++ b/man/Makefile @@ -1,11 +1,11 @@ -shairport-sync.1: shairport-sync.1.xml - xmltoman shairport-sync.1.xml > shairport-sync.1 - -shairport-sync.html: shairport-sync.1.xml - xsltproc xmltoman.xsl shairport-sync.1.xml > shairport-sync.html - all: shairport-sync.1 shairport-sync.html +%.1: %.1.xml + xmltoman $*.1.xml > $*.tmp && mv $*.tmp $*.1 + +%.html: %.1.xml + xsltproc xmltoman.xsl $*.1.xml > $*.tmp && mv $*.tmp $*.html + clean: rm shairport-sync.1 rm shairport-sync.html