Skip to content

Commit 304546b

Browse files
committed
Delay errors from missing 'xpath' executable
Currently running any make target without 'xpath' installed will print: make: xpath: No such file or directory This looks bad but isn't actually a problem unless you're trying to use the zip-file target (or the lwg$(LISTREV).zip target it depends on). Suppress the error for xpath not being found and only fail if the LISTREV variable is empty when building the lwg$(LISTREV).zip target.
1 parent 4b4f7c5 commit 304546b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ history: bin/lists
6565
mailing:
6666
mkdir $@
6767

68-
LISTREV := $(shell xpath -q -e 'substring(issueslist/@revision,2)' xml/lwg-issues.xml)
68+
LISTREV := $(shell type xpath 2>/dev/null && xpath -q -e 'substring(issueslist/@revision,2)' xml/lwg-issues.xml)
6969

7070
zip-file: lwg$(LISTREV).zip
7171

7272
lwg$(LISTREV).zip: lists
73+
@test -z "$(LISTREV)" && echo "Install 'xpath' to create zip file" >&2 && false
7374
@cd mailing && zip ../$@ \
7475
lwg-active.html lwg-closed.html lwg-defects.html \
7576
lwg-index.html lwg-index-open.html lwg-status.html lwg-toc.html

0 commit comments

Comments
 (0)