mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Integrate Doxygen better in the build system
This change: - Adds a check for the doxygen program to configure. - Moves the Doxyfile from src/Doxyfile to doc/Doxyfile.in. - Generates a doc/Doxyfile from doc/Doxyfile.in inserting an absolute path to the source directory, so that it also works when builddir != srcdir. - Adds `make api` rule for running doxygen; it depends on api/doxygen file which is never created to force the rule to always run.
This commit is contained in:
parent
ee3eeab4e6
commit
1079c95b9d
@ -56,6 +56,7 @@ CATALOGS = @CATALOGS@
|
|||||||
CC = @CC@
|
CC = @CC@
|
||||||
CG_COMMIT_ID = @CG_COMMIT_ID@
|
CG_COMMIT_ID = @CG_COMMIT_ID@
|
||||||
CONFDIR = @CONFDIR@
|
CONFDIR = @CONFDIR@
|
||||||
|
DOXYGEN = @DOXYGEN@
|
||||||
GLIBC21 = @GLIBC21@
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
@ -99,6 +100,7 @@ CONFIG_NLS = @CONFIG_NLS@
|
|||||||
CONFIG_256_COLORS = @CONFIG_256_COLORS@
|
CONFIG_256_COLORS = @CONFIG_256_COLORS@
|
||||||
CONFIG_88_COLORS = @CONFIG_88_COLORS@
|
CONFIG_88_COLORS = @CONFIG_88_COLORS@
|
||||||
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
|
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
|
||||||
|
CONFIG_DOXYGEN = @CONFIG_DOXYGEN@
|
||||||
CONFIG_BACKTRACE = @CONFIG_BACKTRACE@
|
CONFIG_BACKTRACE = @CONFIG_BACKTRACE@
|
||||||
CONFIG_BITTORRENT = @CONFIG_BITTORRENT@
|
CONFIG_BITTORRENT = @CONFIG_BITTORRENT@
|
||||||
CONFIG_BOOKMARKS = @CONFIG_BOOKMARKS@
|
CONFIG_BOOKMARKS = @CONFIG_BOOKMARKS@
|
||||||
|
10
configure.in
10
configure.in
@ -95,10 +95,18 @@ if test "x$CONFIG_DOC" != xno; then
|
|||||||
if test "x$POD2HTML" != "x"; then
|
if test "x$POD2HTML" != "x"; then
|
||||||
EL_CONFIG(CONFIG_POD2HTML, [Pod2HTML])
|
EL_CONFIG(CONFIG_POD2HTML, [Pod2HTML])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROGS(DOXYGEN, "doxygen")
|
||||||
|
if test "x$DOXYGEN" != "x"; then
|
||||||
|
EL_CONFIG(CONFIG_DOXYGEN, [Doxygen])
|
||||||
|
api_srcdir="$(cd "$srcdir" && pwd)/src"
|
||||||
|
AC_SUBST(api_srcdir)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(ASCIIDOC_FLAGS)
|
AC_SUBST(ASCIIDOC_FLAGS)
|
||||||
AC_SUBST(CONFIG_ASCIIDOC)
|
AC_SUBST(CONFIG_ASCIIDOC)
|
||||||
|
AC_SUBST(CONFIG_DOXYGEN)
|
||||||
AC_SUBST(CONFIG_POD2HTML)
|
AC_SUBST(CONFIG_POD2HTML)
|
||||||
AC_SUBST(CONFIG_XMLTO)
|
AC_SUBST(CONFIG_XMLTO)
|
||||||
AC_SUBST(CONFIG_JW)
|
AC_SUBST(CONFIG_JW)
|
||||||
@ -106,6 +114,7 @@ AC_SUBST(CONFIG_JW)
|
|||||||
EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation Tools])
|
EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation Tools])
|
||||||
EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats])
|
EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats])
|
||||||
EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats])
|
EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats])
|
||||||
|
EL_CONFIG_DEPENDS(CONFIG_APIDOCS, [CONFIG_DOXYGEN], [API Documentation])
|
||||||
|
|
||||||
dnl gcc specific options (to be continued at the bottom of configure)
|
dnl gcc specific options (to be continued at the bottom of configure)
|
||||||
if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
|
if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
|
||||||
@ -1451,6 +1460,7 @@ AC_CONFIG_FILES([ \
|
|||||||
contrib/elinks.spec \
|
contrib/elinks.spec \
|
||||||
contrib/lua/hooks.lua \
|
contrib/lua/hooks.lua \
|
||||||
contrib/conv/w3m2links.awk \
|
contrib/conv/w3m2links.awk \
|
||||||
|
doc/Doxyfile \
|
||||||
doc/man/man1/elinks.1 \
|
doc/man/man1/elinks.1 \
|
||||||
src/intl/gettext/ref-add.sed \
|
src/intl/gettext/ref-add.sed \
|
||||||
src/intl/gettext/ref-del.sed
|
src/intl/gettext/ref-del.sed
|
||||||
|
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@ -12,3 +12,4 @@ keymap-defaults.txt
|
|||||||
manual.html-chunked
|
manual.html-chunked
|
||||||
option-command.txt
|
option-command.txt
|
||||||
option-config.txt
|
option-config.txt
|
||||||
|
Doxyfile
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
DOXYFILE_ENCODING = UTF-8
|
DOXYFILE_ENCODING = UTF-8
|
||||||
PROJECT_NAME = ELinks
|
PROJECT_NAME = ELinks
|
||||||
PROJECT_NUMBER = 0.12.GIT
|
PROJECT_NUMBER = 0.12.GIT
|
||||||
OUTPUT_DIRECTORY = ../doc/api
|
OUTPUT_DIRECTORY = api
|
||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
@ -26,7 +26,7 @@ ABBREVIATE_BRIEF = "The $name class" \
|
|||||||
ALWAYS_DETAILED_SEC = NO
|
ALWAYS_DETAILED_SEC = NO
|
||||||
INLINE_INHERITED_MEMB = NO
|
INLINE_INHERITED_MEMB = NO
|
||||||
FULL_PATH_NAMES = YES
|
FULL_PATH_NAMES = YES
|
||||||
STRIP_FROM_PATH = .
|
STRIP_FROM_PATH = @api_srcdir@
|
||||||
STRIP_FROM_INC_PATH =
|
STRIP_FROM_INC_PATH =
|
||||||
SHORT_NAMES = NO
|
SHORT_NAMES = NO
|
||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
@ -90,7 +90,7 @@ WARN_LOGFILE =
|
|||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
INPUT = .
|
INPUT = @api_srcdir@
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *.c \
|
FILE_PATTERNS = *.c \
|
||||||
*.h \
|
*.h \
|
14
doc/Makefile
14
doc/Makefile
@ -56,6 +56,8 @@ MAN_DOCS-$(CONFIG_XMLTO) += \
|
|||||||
PDF_DOCS-$(CONFIG_JW) += \
|
PDF_DOCS-$(CONFIG_JW) += \
|
||||||
manual.pdf
|
manual.pdf
|
||||||
|
|
||||||
|
API_DOCS-$(CONFIG_DOXYGEN) += \
|
||||||
|
api/doxygen
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Set the default doc rules
|
## Set the default doc rules
|
||||||
@ -63,11 +65,13 @@ PDF_DOCS-$(CONFIG_JW) += \
|
|||||||
MAN_DOCS = $(MAN_DOCS-yes)
|
MAN_DOCS = $(MAN_DOCS-yes)
|
||||||
HTML_DOCS = $(HTML_DOCS-yes)
|
HTML_DOCS = $(HTML_DOCS-yes)
|
||||||
PDF_DOCS = $(PDF_DOCS-yes)
|
PDF_DOCS = $(PDF_DOCS-yes)
|
||||||
|
API_DOCS = $(API_DOCS-yes)
|
||||||
|
|
||||||
txt: $(TXT_DOCS_NOINSTALL)
|
txt: $(TXT_DOCS_NOINSTALL)
|
||||||
html: txt $(HTML_DOCS)
|
html: txt $(HTML_DOCS)
|
||||||
pdf: txt $(PDF_DOCS)
|
pdf: txt $(PDF_DOCS)
|
||||||
man: txt $(MAN_DOCS)
|
man: txt $(MAN_DOCS)
|
||||||
|
api: $(API_DOCS)
|
||||||
|
|
||||||
all-docs: man html pdf
|
all-docs: man html pdf
|
||||||
|
|
||||||
@ -99,7 +103,6 @@ clean-local:
|
|||||||
# TODO: perl.pod should be pod2ized during make install. --pasky
|
# TODO: perl.pod should be pod2ized during make install. --pasky
|
||||||
install-local:
|
install-local:
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Generated asciidoc files
|
# Generated asciidoc files
|
||||||
|
|
||||||
@ -151,6 +154,9 @@ quiet_cmd_pod2html = ' [$(LINK_COLOR)POD2HTML$(END_COLOR)] $(RELPATH)$@'
|
|||||||
quiet_cmd_asciidoc = ' [$(LINK_COLOR)ASCIIDOC$(END_COLOR)] $(RELPATH)$@'
|
quiet_cmd_asciidoc = ' [$(LINK_COLOR)ASCIIDOC$(END_COLOR)] $(RELPATH)$@'
|
||||||
cmd_asciidoc = $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b $(call backend) -d $(call doctype) -o $@ $<
|
cmd_asciidoc = $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b $(call backend) -d $(call doctype) -o $@ $<
|
||||||
|
|
||||||
|
quiet_cmd_doxygen = ' [$(LINK_COLOR)DOXYGEN$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_doxygen = $(DOXYGEN) $(2)
|
||||||
|
|
||||||
# Based on $@ find out asciidoc doctype or backend + xmlto output dir.
|
# Based on $@ find out asciidoc doctype or backend + xmlto output dir.
|
||||||
doctype = $(if $(findstring .1.,$@)$(findstring .5.,$@),manpage,book)
|
doctype = $(if $(findstring .1.,$@)$(findstring .5.,$@),manpage,book)
|
||||||
backend = $(if $(findstring .xml,$@),docbook,xhtml11)
|
backend = $(if $(findstring .xml,$@),docbook,xhtml11)
|
||||||
@ -199,5 +205,11 @@ man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\"
|
|||||||
perl-%.html: %.pl
|
perl-%.html: %.pl
|
||||||
$(call cmd,pod2html)
|
$(call cmd,pod2html)
|
||||||
|
|
||||||
|
Doxyfile: $(srcdir)Doxyfile.in $(top_srcdir)/configure.in
|
||||||
|
cd $(top_builddir) && \
|
||||||
|
CONFIG_FILES="$(RELPATH)$@" CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
api/doxygen: Doxyfile $(shell find $(top_srcdir)/src/ -name '*.[ch]' -o -name options.inc -o -name 'actions-*.inc' | sort)
|
||||||
|
$(call cmd,doxygen,$<)
|
||||||
|
|
||||||
include $(top_srcdir)/Makefile.lib
|
include $(top_srcdir)/Makefile.lib
|
||||||
|
Loading…
Reference in New Issue
Block a user