summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2007-04-02 21:01:57 -0400
committerDavid Zeuthen <davidz@redhat.com>2007-04-02 21:01:57 -0400
commit4a2fdce129bc9300e1931ae4c8f3d449c70c4a71 (patch)
tree5a29344b3520a51ac94c904c5e6b200e57cc1924
parent23bf8e38fde374ed21419f299887c9ebd22b4413 (diff)
properly use $(docdir)
* Bump autoconf dependency to 2.59 so we have $(docdir) * Remove custom $(DOCDIR) from configure.in and use $(docdir) in doc/spec/Makefile.am instead * Generate man pages during make time using sed as recommended [1]. * Use $(docdir), $(sbindir) and $(sysconfdir) instead of fixed paths. * Generate man_MANS list automatically from MAN_IN_FILES [1] http://tinyurl.com/yueld5
-rw-r--r--configure.in22
-rw-r--r--doc/man/Makefile.am11
-rw-r--r--doc/man/hal-disable-polling.1.in2
-rw-r--r--doc/man/hal-find-by-capability.1.in2
-rw-r--r--doc/man/hal-find-by-property.1.in2
-rw-r--r--doc/man/hal-get-property.1.in2
-rw-r--r--doc/man/hal-is-caller-locked-out.1.in2
-rw-r--r--doc/man/hal-lock.1.in2
-rw-r--r--doc/man/hal-set-property.1.in2
-rw-r--r--doc/man/hald.8.in8
-rw-r--r--doc/man/lshal.1.in2
-rw-r--r--doc/spec/Makefile.am2
12 files changed, 24 insertions, 35 deletions
diff --git a/configure.in b/configure.in
index 401d5af1..4a2c76be 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ dnl Process this file with autoconf to produce a configure script.
# Patches for that is welcome.
#
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
AC_INIT(hal, 0.5.9, david@fubar.dk)
AM_INIT_AUTOMAKE(hal, 0.5.9)
AM_CONFIG_HEADER(config.h)
@@ -650,16 +650,6 @@ fi
AC_SUBST(HALD_SOCKET_DIR)
AC_DEFINE_UNQUOTED(HALD_SOCKET_DIR, "$HALD_SOCKET_DIR", [socket dir])
-# documentation target
-AC_ARG_WITH(doc-dir, [ --with-doc-dir=[dirname] directory to install documentation])
-if ! test -z "$with_doc_dir"; then
- DOCDIR=$with_doc_dir
-else
- DOCDIR="$DATADIR/doc/hal-$VERSION"
-fi
-
-AC_SUBST(DOCDIR)
-
ALL_LINGUAS="ca cs da de el es et eu fi fr hu it ja km ko lt nb nl pa pl pt_BR pt ru sl_SI sv tr uk zh_CN zh_TW"
AC_SUBST(ALL_LINGUAS)
@@ -885,15 +875,6 @@ doc/api/libhal-storage/version.xml
doc/spec/Makefile
doc/spec/hal-spec.xml.in
doc/man/Makefile
-doc/man/hald.8
-doc/man/lshal.1
-doc/man/hal-get-property.1
-doc/man/hal-set-property.1
-doc/man/hal-find-by-property.1
-doc/man/hal-find-by-capability.1
-doc/man/hal-is-caller-locked-out.1
-doc/man/hal-lock.1
-doc/man/hal-disable-polling.1
po/Makefile.in
])
@@ -910,7 +891,6 @@ echo "
datadir: ${DATADIR}
sysconfdir: ${SYSCONFDIR}
localstatedir: ${LOCALSTATEDIR}
- docdir: ${DOCDIR}
dbus-1 system.d dir: ${DBUS_SYS_DIR}
pci.ids dir: ${PCI_IDS_DIR}
usb.ids dir: ${USB_IDS_DIR}
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 8be27840..c54c16b6 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -3,7 +3,7 @@ if MAN_PAGES_ENABLED
MAN_IN_FILES = hald.8.in lshal.1.in hal-get-property.1.in hal-set-property.1.in hal-find-by-property.1.in hal-find-by-capability.1.in hal-is-caller-locked-out.1.in hal-lock.1.in hal-disable-polling.1.in
-man_MANS = hald.8 lshal.1 hal-get-property.1 hal-set-property.1 hal-find-by-property.1 hal-find-by-capability.1 hal-is-caller-locked-out.1 hal-lock.1 hal-disable-polling.1
+man_MANS = $(MAN_IN_FILES:.in=)
endif # MAN_PAGES_ENABLED
@@ -11,3 +11,12 @@ EXTRA_DIST=$(man_MANS) $(MAN_IN_FILES)
clean-local:
rm -f *~ *.1 *.8
+
+%: %.in Makefile
+ $(edit) $< >$@
+
+edit = sed \
+ -e 's|@docdir[@]|$(docdir)|g' \
+ -e 's|@sbindir[@]|$(sbindir)|g' \
+ -e 's|@sysconfdir[@]|$(sysconfdir)|g'
+
diff --git a/doc/man/hal-disable-polling.1.in b/doc/man/hal-disable-polling.1.in
index 343d3bc4..53f55b47 100644
--- a/doc/man/hal-disable-polling.1.in
+++ b/doc/man/hal-disable-polling.1.in
@@ -17,7 +17,7 @@ detection on drives with removable storage. For more information about
both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-find-by-capability.1.in b/doc/man/hal-find-by-capability.1.in
index 2417e455..880d7351 100644
--- a/doc/man/hal-find-by-capability.1.in
+++ b/doc/man/hal-find-by-capability.1.in
@@ -19,7 +19,7 @@ device database by looking at device capabilities. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-find-by-property.1.in b/doc/man/hal-find-by-property.1.in
index ce76388e..f8f8cdc1 100644
--- a/doc/man/hal-find-by-property.1.in
+++ b/doc/man/hal-find-by-property.1.in
@@ -19,7 +19,7 @@ device database by looking at device properties. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-get-property.1.in b/doc/man/hal-get-property.1.in
index ecb15f64..8a502bbc 100644
--- a/doc/man/hal-get-property.1.in
+++ b/doc/man/hal-get-property.1.in
@@ -19,7 +19,7 @@ device database. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-is-caller-locked-out.1.in b/doc/man/hal-is-caller-locked-out.1.in
index 3c73f17d..67b31b73 100644
--- a/doc/man/hal-is-caller-locked-out.1.in
+++ b/doc/man/hal-is-caller-locked-out.1.in
@@ -17,7 +17,7 @@ locked out of a specific D-Bus interface on a specific device. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-lock.1.in b/doc/man/hal-lock.1.in
index 6cb11a61..51a713c4 100644
--- a/doc/man/hal-lock.1.in
+++ b/doc/man/hal-lock.1.in
@@ -17,7 +17,7 @@ either on a given device or globally. For more information about both
the big picture and the semantics of
.B HAL
locks, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hal-set-property.1.in b/doc/man/hal-set-property.1.in
index b9b2d339..10836d99 100644
--- a/doc/man/hal-set-property.1.in
+++ b/doc/man/hal-set-property.1.in
@@ -19,7 +19,7 @@ device database. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/man/hald.8.in b/doc/man/hald.8.in
index 0c1a0b79..37280779 100644
--- a/doc/man/hald.8.in
+++ b/doc/man/hald.8.in
@@ -18,7 +18,7 @@ the \fID-Bus\fP system message bus to provide an API that applications
can use to discover, monitor and invoke operations on devices. For
more information about both the big picture and specific API details,
refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
@@ -55,7 +55,7 @@ Second, shut down the existing
.B hald
daemon instance; on a Fedora system this is achieved by
-.I "/etc/init.d/haldaemon stop"
+.I "@sysconfdir@/init.d/haldaemon stop"
After having shut down the daemon, you might want to run
@@ -65,11 +65,11 @@ to ensure that all the helper processe of
.B hald
are killed too. To start the HAL daemon, use
-.I "/usr/sbin/hald --daemon=no --verbose=yes"
+.I "@sbindir@/hald --daemon=no --verbose=yes"
If the daemon crashes, you can start it under a debugger via
-.I "gdb /usr/sbin/hald"
+.I "gdb @sbindir@/hald"
and then typing
diff --git a/doc/man/lshal.1.in b/doc/man/lshal.1.in
index 02f4fd39..bea6e68a 100644
--- a/doc/man/lshal.1.in
+++ b/doc/man/lshal.1.in
@@ -18,7 +18,7 @@ device database. For
more information about both the big picture and specific
.B HAL
properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal-@VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
depending on the distribution.
.SH OPTIONS
diff --git a/doc/spec/Makefile.am b/doc/spec/Makefile.am
index 646110e8..df1ea9bf 100644
--- a/doc/spec/Makefile.am
+++ b/doc/spec/Makefile.am
@@ -12,7 +12,7 @@ SPEC_XML_EXTRA_FILES = \
if DOCBOOK_DOCS_ENABLED
-htmldocdir = $(DOCDIR)/spec
+htmldocdir = $(docdir)/spec
htmldoc_DATA = hal-spec.html $(FIGURE_FILES) docbook.css
hal-spec.html : hal-spec.xml.in $(FIGURE_FILES) $(SPEC_XML_EXTRA_FILES)