From 2479d8ae3900a45bcee1898db741eb7bee1cffcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Date: Fri, 4 Jan 2019 18:02:53 +0100
Subject: [PATCH] Fix targets used from the main git repo

---
 Makefile        |  2 +-
 makefile.locale | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index f0e7f23..00d1e74 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ endef
 
 .PHONY: $(TARGETS)
 
-man all html : po4a-stamp
+man all html doc-l10n : po4a-stamp
 
 $(foreach lang,$(ALL_LANGUAGES),$(foreach target, $(TARGETS), $(eval $(call MAKE_TARGET,$(target),$(lang)))))
 
diff --git a/makefile.locale b/makefile.locale
index e1e4f6d..37a4b4d 100644
--- a/makefile.locale
+++ b/makefile.locale
@@ -4,7 +4,7 @@ MAN_FILTER = $(wildcard git-*.txt)
 HTML_FILTER = $(patsubst %.txt,%.html,$(MAN_FILTER))
 
 
-ifeq ($(wildcard ../../build-docdep.perl),../../buid-docdep.perl)
+ifeq ($(wildcard ../../build-docdep.perl),../../build-docdep.perl)
 
 vpath %conf . .. ../..
 vpath %in . .. ../..
@@ -22,13 +22,15 @@ include ../../Makefile
 ASCIIDOC_EXTRA += -I../..
 XMLTO_EXTRA += --searchpath ../..
 
+doc-l10n: all
+
 install-l10n:
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
-	[ ! -z $(DOC_MAN1) ] && $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
-	[ ! -z $(DOC_MAN5) ] && $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir)
-	[ ! -z $(DOC_MAN7) ] && $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
+	if [ ! -z "$(DOC_MAN1)" ]; then $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); fi
+	if [ ! -z "$(DOC_MAN5)" ]; then $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); fi
+	if [ ! -z "$(DOC_MAN7)" ]; then $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir); fi
 
 
 else
@@ -49,9 +51,10 @@ html: $(HTML_FILTER)
 
 all doc-l10n: man html
 
+endif
+
 clean:
 	rm -f *.1 *.html
 
 mrproper: clean
 	rm -f *.txt
-endif
-- 
GitLab