From 175d71226dc6d6e17fdacdd075354c37bba0e46e Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Thu, 22 Nov 2018 12:30:40 +0100 Subject: [PATCH] Fixup for previous commit: $XML_CATALOG_FILES is a file --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d6ab262..2dfe484 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,9 @@ ifndef BASH_PATH endif # a2x sometimes need $XML_CATALOG_FILES to be set. If a2x fails, retry -# with XML_CATALOG_FILES set to these directories, if they exist. See +# with XML_CATALOG_FILES set to these files, if they exist. See # https://gitlab.com/git-latexdiff/git-latexdiff/issues/35#note_119280499 -XML_CATALOG_DIRS = /usr/local/etc/xml/catalog +TRY_XML_CATALOG_FILES = /usr/local/etc/xml/catalog BASH_PATH_SQ = $(subst ','\'',$(BASH_PATH)) GIT_LATEXDIFF_VERSION=${shell git describe --tags HEAD 2>/dev/null || \ @@ -51,10 +51,10 @@ git-latexdiff.txt: git-latexdiff git-latexdiff.txt.header git-latexdiff.1: git-latexdiff.txt a2x --doctype manpage --format manpage $< || { \ - for d in $(XML_CATALOG_DIRS); do \ - if [ -d $$d ]; then \ - echo "a2x failed, retrying with XML_CATALOG_FILES=$$d" ;\ - XML_CATALOG_FILES=$$d \ + for f in $(TRY_XML_CATALOG_FILES); do \ + if [ -f $$f ]; then \ + echo "a2x failed, retrying with XML_CATALOG_FILES=$$f" ;\ + XML_CATALOG_FILES=$$f \ a2x --doctype manpage --format manpage $< && exit 0; \ fi ; \ done ; \