From 6231171dad8488645be325754f316a43b906b512 Mon Sep 17 00:00:00 2001 From: "Theodore A. Roth" Date: Thu, 6 Mar 2003 07:48:08 +0000 Subject: [PATCH] * configure.ac: Add --enable-versioned-doc option and set DOC_INST_DIR. * doc/Makefile.am: Add rules to install docs in DOC_INST_DIR. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@267 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/configure.ac | 20 ++++++++++++++++++++ avrdude/doc/Makefile.am | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/avrdude/configure.ac b/avrdude/configure.ac index 28cca8b6..9981ab89 100644 --- a/avrdude/configure.ac +++ b/avrdude/configure.ac @@ -59,6 +59,26 @@ AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strt # Checks for misc stuff. +AC_ARG_ENABLE( + [versioned-doc], + AC_HELP_STRING( + [--enable-versioned-doc], + [install docs in directory with version name (default)]), + [case "${enableval}" in + yes) versioned_doc=yes ;; + no) versioned_doc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for versioned-doc option) ;; + esac], + [versioned_doc=yes]) + +if test "$versioned_doc" = "yes"; then + DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avrdude-$(VERSION)' +else + DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avrdude' +fi + +AC_SUBST(DOC_INST_DIR, $DOC_INST_DIR) + # Find the parallel serial device files based on target system # If a system doesn't have a PC style parallel, mark it as unknown. case $target in diff --git a/avrdude/doc/Makefile.am b/avrdude/doc/Makefile.am index 3ef76cb1..6427b6af 100644 --- a/avrdude/doc/Makefile.am +++ b/avrdude/doc/Makefile.am @@ -32,3 +32,19 @@ html: clean-local: rm -rf avrdude-html *.info + +install-data-local: install-docs + +install-docs: html ps pdf + $(mkinstalldirs) $(DOC_INST_DIR) + $(INSTALL_DATA) avrdude.ps $(DOC_INST_DIR)/avrdude.ps + $(INSTALL_DATA) avrdude.pdf $(DOC_INST_DIR)/avrdude.pdf + $(mkinstalldirs) $(DOC_INST_DIR)/avrdude-html + @list=`echo avrdude-html/*.html`; \ + for file in $$list; \ + do \ + $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file; \ + done + +uninstall-local: + rm -rf $(DOC_INST_DIR)