build: change doxygen target to be properly dependency-based

This hackery (thanks libinput) is clearer and more precise than the
previous hackery.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2017-07-28 18:19:40 +03:00
parent 0a19267f30
commit 4983dbcf43
3 changed files with 21 additions and 19 deletions

View File

@ -149,18 +149,29 @@ src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xk
if ENABLE_DOCS
if HAVE_DOXYGEN
doc: doc/stamp-doxygen
doxygen_input = \
$(top_srcdir)/README.md \
$(top_srcdir)/doc/quick-guide.md \
$(top_srcdir)/doc/compat.md \
$(top_srcdir)/xkbcommon/xkbcommon.h \
$(top_srcdir)/xkbcommon/xkbcommon-names.h \
$(top_srcdir)/xkbcommon/xkbcommon-x11.h \
$(top_srcdir)/xkbcommon/xkbcommon-compose.h
doc/html: doc/Doxyfile $(doxygen_input)
$(AM_V_GEN)(\
cat $<; \
echo "INPUT = $(doxygen_input)"; \
echo "OUTPUT_DIRECTORY = $(abs_top_builddir)/doc"; \
) | $(DOXYGEN) -
clean-doxygen:
rm -rf doc/html
doc: doc/html
clean-doc: clean-doxygen
all-local:: doc
clean-local:: clean-doc
doc/stamp-doxygen: $(top_srcdir)/xkbcommon/*.h
$(AM_V_GEN)(cd $(top_srcdir) && $(DOXYGEN) $(abs_top_builddir)/doc/Doxyfile)
touch $@
clean-doxygen:
rm -rf doc/html doc/stamp-doxygen
install-data-local:: doc
$(MKDIR_P) $(DESTDIR)$(htmldir)
$(INSTALL_DATA) doc/html/* $(DESTDIR)$(htmldir)

1
doc/.gitignore vendored
View File

@ -1,3 +1,2 @@
Doxyfile
html/
stamp-doxygen

View File

@ -2,8 +2,6 @@ PROJECT_NAME = @PACKAGE_NAME@
PROJECT_NUMBER = @PACKAGE_VERSION@
OUTPUT_DIRECTORY = @abs_top_builddir@/doc
BRIEF_MEMBER_DESC = NO
JAVADOC_AUTOBRIEF = YES
@ -18,13 +16,7 @@ QUIET = YES
WARN_IF_UNDOCUMENTED = NO
INPUT = README.md \
doc/quick-guide.md \
doc/compat.md \
xkbcommon/xkbcommon.h \
xkbcommon/xkbcommon-names.h \
xkbcommon/xkbcommon-x11.h \
xkbcommon/xkbcommon-compose.h \
INPUT = @INPUT@
FILE_PATTERNS = *.c \
*.h
@ -40,7 +32,7 @@ ALPHABETICAL_INDEX = NO
IGNORE_PREFIX = xkb_ \
XKB_
HTML_EXTRA_STYLESHEET = doc/doxygen-extra.css
HTML_EXTRA_STYLESHEET = @abs_top_srcdir@/doc/doxygen-extra.css
HTML_TIMESTAMP = NO