From a78bd8c876d1e5cc753b5b75153613fc5e2c8f2c Mon Sep 17 00:00:00 2001 From: Carsten Schoenert Date: Mon, 25 May 2015 22:33:08 +0200 Subject: [PATCH] doc/Makefile.am: respect DESTDIR variable The old behavior didn't allow a additonal setting of the DESTDIR variable. This is a serious problem while building within a chroot for example. Also the implementation of the stamp file was triggering multiple builds in some cirumstances. This handling is reverted with the remove of the old stamp file handling. --- doc/Makefile.am | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index af754ac4..d8dfa546 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,25 +10,32 @@ if HAVE_DOXYGEN -dist_pkgdata_DATA = doxyfile.stamp - CLEANFILES = \ - doxyfile.stamp \ doxygen_sqlite3.db -doxyfile.stamp: - $(DOXYGEN) Doxyfile - echo Timestamp > doxyfile.stamp -all-local: doxyfile.stamp +# This target has no check for automated install data! It's simply assumed that +# that the 'all' target is running before, in short: the user has to run first +# 'make' before running 'make install'! +install-data-am: + @if [ ! -d $(srcdir)/html ]; then \ + echo ;\ + echo " No install data in '$(srcdir)/html'found! Please run 'make all' first." ;\ + echo ;\ + exit 1 ;\ + fi + $(MKDIR_P) $(DESTDIR)$(htmldir)/html || exit 1 + cp -a $(srcdir)/html $(DESTDIR)$(htmldir) + +uninstall-am: + -rm -rf $(DESTDIR)$(htmldir)/html + +all: + $(DOXYGEN) Doxyfile clean-local: rm -rf $(srcdir)/html -install-data-am: all-local - $(MKDIR_P) $(htmldir)/html || exit 1 - cp -a $(srcdir)/html $(htmldir) - -.PHONY: doxyfile.stamp +distclean-local: clean-local endif # HAVE_DOXYGEN