moved definition of docdir from Makefile.am to m4 macros
made hotplug stuff installation location configurable git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5371 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -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
|
||||
|
||||
########################################################################
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 -)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
])
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user