]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* man/generate_mans.mak: Fix the generation of translated man
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 17:02:10 +0000 (17:02 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 17:02:10 +0000 (17:02 +0000)
pages. xml2po removed the comment from empty headers and the
config was no more inserted.

ChangeLog
man/generate_mans.mak

index 251b4c7e4070b32d1cecbec2d7030d1d2dc66536..9ad939a650f3f86c9482f2bd36c34e8db7249fae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-18  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * man/generate_mans.mak: Fix the generation of translated man
+       pages. xml2po removed the comment from empty headers and the
+       config was no more inserted.
+
 2011-09-18  Nicolas François  <nicolas.francois@centraliens.net>
 
        * man/chage.1.xml: The LOGIN argument is not optional.
index 8854f5dcd2f7da4e120aaad9f0c92a6f8f72ca7f..09631f499b75947d7b5fe84cb2923ba00a33e7c5 100644 (file)
@@ -22,7 +22,11 @@ endif
 
 if ENABLE_REGENERATE_MAN
 %.xml-config: %.xml Makefile
-       sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $< > $@
+       if grep -q SHADOW-CONFIG-HERE $<; then \
+               sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $< > $@; \
+       else \
+               sed -e 's/^\(<!DOCTYPE .*docbookx.dtd"\)>/\1 [<!ENTITY % config SYSTEM "config.xml">%config;]>/' $< > $@; \
+       fi
 
 %: %.xml-config Makefile config.xml
        $(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND);$(TCB_COND);$(SHA_CRYPT_COND)" \