Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make manpages #405

Merged
merged 5 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ ACLOCAL_AMFLAGS = -I m4

dist_doc_DATA = COPYING INSTALL README.markdown

SUBDIRS = include lib docs tools tests examples doxygen2man

doxygen:
$(MAKE) -C docs doxygen
SUBDIRS = include lib doxygen2man docs tools tests examples

dist-clean-local:
rm -f .snapshot-version autoconf automake autoheader
Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ PKG_CHECK_MODULES([libxml], [libxml-2.0])
# a locally installed version. If neither are usable, then
# don´t build the man pages
if test "x$cross_compiling" = "xno"; then
AM_CONDITIONAL([BUILD_MAN], 1)
DOXYGEN2MAN="\$(abs_builddir)/doxygen2man/doxygen2man"
AM_CONDITIONAL([BUILD_MAN], [true])
DOXYGEN2MAN="\$(abs_builddir)/../doxygen2man/doxygen2man"
else
AC_CHECK_PROGS([DOXYGEN2MAN], [doxygen2man])
if test "x$DOXYGEN2MAN" = "x"; then
AM_CONDITIONAL([BUILD_MAN], 0)
AM_CONDITIONAL([BUILD_MAN], [false])
else
AM_CONDITIONAL([BUILD_MAN], [true])
fi
fi
AC_SUBST(DOXYGEN2MAN)
Expand Down Expand Up @@ -812,8 +814,6 @@ AC_CONFIG_FILES([Makefile
examples/Makefile
doxygen2man/Makefile
docs/Makefile
docs/common.dox
docs/html.dox
docs/man.dox
lib/qblog_script.la:lib/qblog_script.la.in])

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
man3
html
xml
*.dox
45 changes: 27 additions & 18 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,42 @@
# along with libqb. If not, see <http://www.gnu.org/licenses/>.

MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = common.dox html.dox man.dox
EXTRA_DIST = man.dox.in
noinst_HEADERS = mainpage.h

dist_man_MANS = man8/qb-blackbox.8
if HAVE_DOXYGEN
inc_dir = $(top_srcdir)/include/qb
public_headers = $(sort $(patsubst %.in,%,$(subst $(inc_dir)/,,$(shell \
printf 'include $(inc_dir)/Makefile.am\n\n%%.var:\n\t@echo $$($$*)' \
| MAKEFLAGS= ${MAKE} --no-print-directory -f- inst_HEADERS.var \
|| echo $(inc_dir)/qb*.h*))))
public_headers_omit = qbconfig.h
public_headers_pick = $(filter-out $(public_headers_omit),$(public_headers) )
if BUILD_MAN

dist_man3_MANS = $(patsubst %,man3/%.3,$(public_headers_pick))
doxygen2man_flags = -q -i qb/ -o man3/ -m -g -P -H "libqb Programmer's Manual"

$(dist_man3_MANS): man.dox $(public_headers_pick:%=$(inc_dir)/%)
mkdir -p man3
dist_man3_MANS = man3/*.3

$(dist_man3_MANS): txt-man

txt-man: man.dox
doxygen man.dox

doxygen: html.dox
mkdir -p html
doxygen html.dox
xml-man: txt-man
mkdir -p man3
$(DOXYGEN2MAN) $(doxygen2man_flags) qbarray_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbatomic_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbdefs_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbhdb_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbipcc_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbipc__common_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbipcs_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qblist_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qblog_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbloop_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbmap_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbrb_8h.xml
$(DOXYGEN2MAN) $(doxygen2man_flags) qbutil_8h.xml

all: $(dist_man3_MANS) xml-man

else
doxygen:
@echo WARNING: no doxygen to build man pages!
endif
endif

clean-local:
rm -rf html man3
rm -rf html man3 xml
Loading