Skip to content

Commit

Permalink
Do not include pregenerated reference documentation in source package…
Browse files Browse the repository at this point in the history
… and move documentation generation from autogen.sh to Makefile
  • Loading branch information
hanna-kn committed Jan 24, 2020
1 parent f53c7a8 commit 474b120
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 18 deletions.
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 11,11 @@ EXTRA_DIST = config.rpath \

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libqalculate.pc

if HAVE_DOXYGEN

.PHONY: docs
docs:
$(MAKE) -C $(top_srcdir)/docs/reference docs

endif
10 changes: 0 additions & 10 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 135,3 @@ if test x$NOCONFIGURE = x; then
else
echo Skipping configure process.
fi

cd $srcdir/docs/reference
echo "Generating API documentation"
doxygen Doxyfile
cd ../../
cd $srcdir
if [ ! -d "$srcdir/docs/reference/html" ]; then
echo "API documentation is missing. Please install doxygen and run autogen.sh again."
exit 1
fi
11 changes: 10 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 95,6 @@ AC_SUBST(QALCULATE_CURRENT)
AC_SUBST(QALCULATE_REVISION)
AC_SUBST(QALCULATE_AGE)


dnl --------------------------------
dnl | check for neccessary libraries |-----------------------------------------
dnl --------------------------------
Expand Down Expand Up @@ -131,6 130,16 @@ AC_SUBST(LIBXML_LIBS)

AM_ICONV()

dnl --------------------------------
dnl | check for doxygen |-----------------------------------------
dnl --------------------------------

AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
AC_MSG_WARN([Doxygen not found - API documentation will not be generated])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])

dnl --------------------------------
dnl | check for readline |-----------------------------------------
dnl --------------------------------
Expand Down
23 changes: 16 additions & 7 deletions docs/reference/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 2,25 @@
# docs/reference/Makefile.am for qalculate
#

EXTRA_DIST = \
$(top_srcdir)/docs/reference/Doxyfile

if HAVE_DOXYGEN

referencedir = $(docdir)/reference/html
reference_DATA = \
$(top_srcdir)/docs/reference/html/*.png \
$(top_srcdir)/docs/reference/html/*.html \
$(top_srcdir)/docs/reference/html/*.css

EXTRA_DIST = \
$(top_srcdir)/docs/reference/Doxyfile \
$(top_srcdir)/docs/reference/html/*.png \
$(top_srcdir)/docs/reference/html/*.html \
$(top_srcdir)/docs/reference/html/*.css
$(top_srcdir)/docs/reference/html/*.css \
$(top_srcdir)/docs/reference/html/*.js

.PHONY: docs
docs:
$(DOXYGEN) Doxyfile

$(top_srcdir)/docs/reference/html/*.html:
$(DOXYGEN) Doxyfile

$(top_srcdir)/docs/reference/html/*.png $(top_srcdir)/docs/reference/html/*.css $(top_srcdir)/docs/reference/html/*.js:

endif

0 comments on commit 474b120

Please sign in to comment.