X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/86d9e9635a23c7ecfe2de7f440a6acce320067bc..6571bee2e2289b3a183ae3a922551eb743839392:/buildlib/po4a_manpage.mak

diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak
index 3ea4e2cb5..dfa215d29 100644
--- a/buildlib/po4a_manpage.mak
+++ b/buildlib/po4a_manpage.mak
@@ -16,7 +16,7 @@ INCLUDES = apt.ent
 # Do not use XMLTO, build the manpages directly with XSLTPROC
 ifdef XSLTPROC
 
-STYLESHEET=./style.$(LC).xsl
+STYLESHEET=../manpage-style.xsl
 
 LOCAL := po4a-manpage-$(firstword $(SOURCE))
 $(LOCAL)-LIST := $(SOURCE)
@@ -28,19 +28,21 @@ veryclean: veryclean/$(LOCAL)
 $($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
 	echo Creating man page $@
 	$(XSLTPROC) -o $@ $(STYLESHEET) $< # why xsltproc doesn't respect the -o flag here???
+	test -f $(subst .$(LC),,$@) || echo FIXME: xsltproc respect the -o flag now, workaround can be removed
 	mv -f $(subst .$(LC),,$@) $@
 
 # Clean rule
 .PHONY: veryclean/$(LOCAL)
 veryclean/$(LOCAL):
 	-rm -rf $($(@F)-LIST) apt.ent apt.$(LC).8 \
-		$(addsuffix .xml,$($(@F)-LIST))
+		$(addsuffix .xml,$($(@F)-LIST)) \
+		offline.$(LC).sgml guide.$(LC).sgml
 
 HAVE_PO4A=yes
 endif
 
 # take care of the rest
-SOURCE := $(SOURCE) apt.$(LC).8
+SOURCE := $(SOURCE) $(wildcard apt.$(LC).8)
 INCLUDES :=
 
 ifndef HAVE_PO4A
@@ -52,3 +54,8 @@ endif
 ifneq ($(words $(SOURCE)),0)
 include $(MANPAGE_H)
 endif
+
+# Debian Doc SGML Documents
+SOURCE := $(wildcard *.$(LC).sgml)
+DEBIANDOC_HTML_OPTIONS=-l $(LC)
+include $(DEBIANDOC_H)