summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--doc/Makefile.am2
-rw-r--r--libgphoto2_port/Makefile.am3
-rw-r--r--libgphoto2_port/doc/DocRules.am6
-rw-r--r--libgphoto2_port/m4/documentation.m428
-rw-r--r--libgphoto2_port/m4/packaging.m428
-rw-r--r--packaging/linux-hotplug/Makefile.am9
7 files changed, 49 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 83ad87ed7..57a2ce575 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,6 @@ EXTRA_DIST = HACKING MAINTAINERS makefile.os2 os2mak.inc TESTERS CHANGES
SUBDIRS = libgphoto2_port libgphoto2 camlibs tests po packaging doc
-docdir = @DOC_DIR@
doc_DATA = AUTHORS COPYING README
########################################################################
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a79d633c8..a772c9b21 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -18,6 +18,4 @@ EXTRA_DIST = DAEMON build_OS2.txt \
man_MANS = gphoto2.3 gphoto2_port.3
-docdir = @DOC_DIR@
-
doc_DATA = FAQ faq.xml
diff --git a/libgphoto2_port/Makefile.am b/libgphoto2_port/Makefile.am
index 64eda5005..8826f8256 100644
--- a/libgphoto2_port/Makefile.am
+++ b/libgphoto2_port/Makefile.am
@@ -9,7 +9,7 @@ bin_SCRIPTS = gphoto2-port-config
SUBDIRS = po libgphoto2_port test @IOLIB_SUBDIRS@ doc m4
-EXTRA_DIST = \
+EXTRA_DIST = \
AUTHORS \
ChangeLog \
COPYING.LIB \
@@ -19,5 +19,4 @@ EXTRA_DIST = \
gphoto2-port-config.in \
makefile.os2 lgp2port.df
-docdir = @DOC_DIR@
doc_DATA = AUTHORS README NEWS
diff --git a/libgphoto2_port/doc/DocRules.am b/libgphoto2_port/doc/DocRules.am
index 075880833..7a9cd2808 100644
--- a/libgphoto2_port/doc/DocRules.am
+++ b/libgphoto2_port/doc/DocRules.am
@@ -12,9 +12,7 @@ maintainer-clean-local: clean
if ENABLE_GTK_DOC
-htmldir=@API_DIR@
-
-TARGET_DIR=$(htmldir)/$(DOC_MODULE)
+TARGET_DIR=$(apidocdir)/$(DOC_MODULE)
all-local: templates sgml html
@@ -35,7 +33,7 @@ install-data-local:
$(INSTALL) -d -m 0755 $(DESTDIR)$(TARGET_DIR)
$(INSTALL_DATA) ./html/*.html $(DESTDIR)$(TARGET_DIR)
$(INSTALL_DATA) ./html/index.sgml $(DESTDIR)$(TARGET_DIR)
- gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(DESTDIR)$(htmldir)
+ gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(DESTDIR)$(apidocdir)
dist-hook:
(cd $(srcdir) ; tar cvf - html) | (cd $(distdir); tar xf -)
diff --git a/libgphoto2_port/m4/documentation.m4 b/libgphoto2_port/m4/documentation.m4
index 1a44e0063..3ef205cba 100644
--- a/libgphoto2_port/m4/documentation.m4
+++ b/libgphoto2_port/m4/documentation.m4
@@ -16,8 +16,8 @@ AC_MSG_CHECKING([main docdir])
if test "x${with_doc_dir}" != "x"
then # docdir is given as parameter
- DOC_DIR="${with_doc_dir}"
- AC_MSG_RESULT([${DOC_DIR} (from parameter)])
+ docdir="${with_doc_dir}"
+ AC_MSG_RESULT([${docdir} (from parameter)])
else # otherwise invent a docdir hopefully compatible with system policy
if test -d "/usr/share/doc"
then
@@ -36,15 +36,15 @@ else # otherwise invent a docdir hopefully compatible with system policy
# FIXME: doesn't work properly.
if ls -d /usr/{share/,}doc/*-[[]0-9[]]* > /dev/null 2>&1
then
- DOC_DIR="${maindocdir}/${PACKAGE}-${VERSION}"
- AC_MSG_RESULT([${DOC_DIR} (redhat style)])
+ docdir="${maindocdir}/${PACKAGE}-${VERSION}"
+ AC_MSG_RESULT([${docdir} (redhat style)])
else
- DOC_DIR="${maindocdir}/${PACKAGE}"
- AC_MSG_RESULT([${DOC_DIR} (default style)])
+ docdir="${maindocdir}/${PACKAGE}"
+ AC_MSG_RESULT([${docdir} (default style)])
fi
fi
-AC_SUBST(DOC_DIR)
+AC_SUBST(docdir)
])dnl
@@ -124,15 +124,15 @@ dnl ---------------------------------------------------------------------------
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH Where to install html docs [default=autodetect]])
AC_MSG_CHECKING([for html dir])
if test "x${with_html_dir}" = "x" ; then
- HTML_DIR="${DOC_DIR}/html"
- AC_MSG_RESULT([${HTML_DIR} (default)])
+ htmldir="${docdir}/html"
+ AC_MSG_RESULT([${htmldir} (default)])
else
- HTML_DIR="${with_html_dir}"
- AC_MSG_RESULT([${HTML_DIR} (from parameter)])
+ htmldir="${with_html_dir}"
+ AC_MSG_RESULT([${htmldir} (from parameter)])
fi
-AC_SUBST(HTML_DIR)
-API_DIR="${HTML_DIR}/api"
-AC_SUBST(API_DIR)
+AC_SUBST(htmldir)
+apidocdir="${htmldir}/api"
+AC_SUBST(apidocdir)
dnl ------------------------------------------------------------------------
dnl try to find xmlto (required for generation of man pages and html docs)
diff --git a/libgphoto2_port/m4/packaging.m4 b/libgphoto2_port/m4/packaging.m4
index 8c3e3249b..a38747abd 100644
--- a/libgphoto2_port/m4/packaging.m4
+++ b/libgphoto2_port/m4/packaging.m4
@@ -30,4 +30,32 @@ AC_DEFUN(GPKG_CHECK_LINUX,
;;
esac
AM_CONDITIONAL(HAVE_LINUX, "$is_linux")
+
+ # required for docdir
+ AC_REQUIRE(GP_CHECK_DOC_DIR)
+
+ AC_ARG_WITH(hotplug-doc-dir, [ --with-hotplug-doc-dir=PATH Where to install hotplug scripts as docs [default=autodetect]])
+
+ if test "x${with_hotplug_doc_dir}" != "x"
+ then # given as parameter
+ hotplugdocdir="${with_hotplug_doc_dir}"
+ AC_MSG_RESULT([${hotplugdocdir} (from parameter)])
+ else # start at docdir
+ hotplugdocdir="${docdir}/linux-hotplug"
+ AC_MSG_RESULT([${hotplugdocdir} (default)])
+ fi
+ AC_SUBST(hotplugdocdir)
+
+ AC_ARG_WITH(hotplug-usermap-dir, [ --with-hotplug-usermap-dir=PATH Where to install hotplug scripts as docs [default=autodetect]])
+
+ if test "x${with_hotplug_usermap_dir}" != "x"
+ then # given as parameter
+ hotplugusermapdir="${with_hotplug_usermap_dir}"
+ AC_MSG_RESULT([${hotplugusermapdir} (from parameter)])
+ else # start at docdir
+ hotplugusermapdir="${docdir}/linux-hotplug"
+ AC_MSG_RESULT([${hotplugusermapdir} (default)])
+ fi
+
+ AC_SUBST(hotplugusermapdir)
])
diff --git a/packaging/linux-hotplug/Makefile.am b/packaging/linux-hotplug/Makefile.am
index 45f0f0336..92a3b7a4c 100644
--- a/packaging/linux-hotplug/Makefile.am
+++ b/packaging/linux-hotplug/Makefile.am
@@ -3,8 +3,7 @@ EXTRA_DIST = usbcam.console usbcam.group usbcam.user
# no need to build or install the following on non-linux systems
if HAVE_LINUX
-docdir = @DOC_DIR@/linux-hotplug
-doc_DATA = usbcam.console usbcam.group usbcam.user usbcam.x11-app
+hotplugdoc_DATA = usbcam.console usbcam.group usbcam.user usbcam.x11-app
INCLUDES = \
-I$(top_srcdir)/libgphoto2 \
@@ -19,9 +18,9 @@ print_usb_usermap_LDADD = ../../libgphoto2/libgphoto2.la
USERMAP = gphoto2-usb.usermap
install-data-local: print-usb-usermap
- ./print-usb-usermap > $(USERMAP)
- mkdir -p $(DESTDIR)$(docdir)/
- $(INSTALL_DATA) $(USERMAP) $(DESTDIR)$(docdir)/
+ ./print-usb-usermap usbcam > $(USERMAP)
+ mkdir -p $(DESTDIR)$(hotplugusermapdir)/
+ $(INSTALL_DATA) $(USERMAP) $(DESTDIR)$(hotplugusermapdir)/
uninstall-local:
rm -f $(DESTDIR)$(docdir)/$(USERMAP)