summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-05-26 07:44:55 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-05-26 07:44:55 -0500
commit8d90eea7dea8ec0bc2f4ab62feeb965cac8675ba (patch)
treee6265524e9c1599a74ce26071e1ae28289a7885e
parentd48f63c55f7281a2540dbb5515d5a42c1332545e (diff)
parentd9f3d682eb02d08afbd29b0c588f90b414d2e482 (diff)
Merge branch 'man-xml'pm-utils-1.1.2
-rw-r--r--configure.ac4
-rw-r--r--man/Makefile.am26
2 files changed, 17 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index b4e8b86..d8fd67f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,9 +22,7 @@ dnl ---------------------------------------------------------------------------
dnl - Manual page build
dnl ---------------------------------------------------------------------------
AC_PATH_PROG(XMLTO, xmlto, no)
-if test "$XMLTO" = "no" ; then
- AC_MSG_ERROR([Cannot find xmlto. Aborting...])
-fi
+AM_CONDITIONAL(HAVE_XMLTO, [test "x$XMLTO" != xno])
dnl ---------------------------------------------------------------------------
dnl - Make paths available for source files
diff --git a/man/Makefile.am b/man/Makefile.am
index a95d07e..f16edb1 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,32 +1,38 @@
-man_MANS = \
+pm_mans = \
on_ac_power.1 \
pm-is-supported.1 \
pm-pmu.8 \
pm-powersave.8 \
pm-action.8
+if HAVE_XMLTO
+man_MANS = $(pm_mans)
+endif
+
EXTRA_DIST = \
on_ac_power.xml \
pm-pmu.xml \
pm-is-supported.xml \
pm-powersave.xml \
pm-action.xml \
- $(man_MANS)
+ $(pm_mans)
MAINTAINERCLEANFILES = \
- $(man_MANS)
+ $(pm_mans)
.xml.1:
- $(XMLTO) man $?
+ $(XMLTO) man $<
.xml.8:
- $(XMLTO) man $?
+ $(XMLTO) man $<
-install-data-hook:
- -mkdir -p $(DESTDIR)$(mandir)/man8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-suspend.8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-hibernate.8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-suspend-hybrid.8
+install-data-hook: install-man
+ @if test -f $(DESTDIR)$(mandir)/man8/pm-action.8; then \
+ for page in pm-suspend pm-hibernate pm-suspend-hybrid; do \
+ echo ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8; \
+ ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8 || exit 1; \
+ done; \
+ fi
clean-local :
rm -f *~