From e2f0f091f1c588ec67de40ff0346d34dc6711dc8 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Thu, 23 Dec 2010 18:14:04 +0100 Subject: [PATCH] Build and install translated man pages by default --- Makefile.am | 3 -- contrib/sssd.spec.in | 1 - src/man/Makefile.am | 54 ++++++++++++++++++++++++++++--------------------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/Makefile.am b/Makefile.am index 174c775..49520f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -964,9 +964,6 @@ update-po: $(MAKE) -C src/man update-po $(MAKE) -C po update-po -translated-manpages: - $(MAKE) -C src/man translate - ####################### # Installation Extras # ####################### diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 88a8353..6d40cf5 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -119,7 +119,6 @@ use with ldap_default_authtok_type = obfuscated_password. --disable-rpath make %{?_smp_mflags} -make translated-manpages %check export CK_TIMEOUT_MULTIPLIER=10 diff --git a/src/man/Makefile.am b/src/man/Makefile.am index 695696b..e09e7a5 100644 --- a/src/man/Makefile.am +++ b/src/man/Makefile.am @@ -82,19 +82,6 @@ update-po: cd $(srcdir) && \ $(PO4A) $(PO4A_BUILD_OPTS) --force $(PO4A_CONFIG) -# Generate translated manual pages -translate: man.stamp - if [ -z $$recursion ]; then \ - for lang in $(LINGUAS); do \ - if [ -d $$lang ]; then \ - sources=$$(ls $$lang/*.xml); \ - manpages=$$(echo $$sources | $(SED) 's/\.xml//'); \ - $(MAKE) recursion=1 man_MANS="$$manpages"; \ - fi \ - done \ - fi - - dist-hook: man.stamp if [ -f man.stamp ]; then \ cp man.stamp $(distdir); \ @@ -113,11 +100,6 @@ dist-hook: man.stamp fi -clean-local: clean-local-@USE_NLS@ -distclean-local: clean-local-@USE_NLS@ -mostlyclean-local: clean-local-@USE_NLS@ -maintainer-clean-local: clean-local-@USE_NLS@ - clean-local-no: clean-local-yes: for lang in $(LINGUAS); do \ @@ -128,6 +110,37 @@ clean-local-yes: rm -f $(man_MANS) rm -f man.stamp +else + +man.stamp: $(XML_DOC) + touch $@ + +clean-local-no: +clean-local-yes: + rm -f $(man_MANS) + rm -f man.stamp + +endif + +clean-local: clean-local-@USE_NLS@ +distclean-local: clean-local-@USE_NLS@ +mostlyclean-local: clean-local-@USE_NLS@ +maintainer-clean-local: clean-local-@USE_NLS@ + +# Generate translated manual pages +all-local: all-local-@USE_NLS@ +all-local-no: +all-local-yes: man.stamp + if [ -z $$recursion ]; then \ + for lang in $(LINGUAS); do \ + if [ -d $$lang ]; then \ + sources=$$(ls $$lang/*.xml); \ + manpages=$$(echo $$sources | $(SED) 's/\.xml//'); \ + $(MAKE) recursion=1 man_MANS="$$manpages"; \ + fi \ + done \ + fi + install-data-local: install-data-local-@USE_NLS@ install-data-local-no: install-data-local-yes: @@ -153,8 +166,3 @@ uninstall-local-yes: man_MANS="$$manpages"; \ fi \ done - -else -translate: - @echo No po4a, skipping translations -endif -- 1.7.3.3