Merge branch 'documentation-build-system'

This commit is contained in:
Will Thompson 2010-10-26 17:11:10 +01:00
commit 75ef1d2ed4
19 changed files with 143 additions and 89 deletions

2
.gitignore vendored
View file

@ -9,12 +9,14 @@ config.log
config.status
config.sub
configure
cscope.out
depcomp
*.pc
install-sh
libtool
ltmain.sh
missing
m4
stamp-h1
stamp-h
stamp-h.in

View file

@ -65,3 +65,5 @@ update-authors:
DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
ACLOCAL_AMFLAGS = -I m4

View file

@ -27,8 +27,12 @@ fi
DIE=1
}
AUTOMAKE=automake-1.9
ACLOCAL=aclocal-1.9
# If the user hasn't explicitly chosen an Automake version, use 1.11. This is
# the earliest version that gives us silent rules.
if test -z "$AUTOMAKE"; then
AUTOMAKE=automake-1.11
ACLOCAL=aclocal-1.11
fi
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
@ -66,7 +70,6 @@ fi
libtoolize --copy --force
echo $ACLOCAL $ACLOCAL_FLAGS
$ACLOCAL $ACLOCAL_FLAGS
## optionally feature autoheader

2
bus/.gitignore vendored
View file

@ -16,9 +16,9 @@ dbus-daemon-launch-helper-test
bus-test
rc.messagebus
messagebus
messagebus-config
session.conf
system.conf
dbus-daemon.1
bus-test-launch-helper
bus-test-system
dbus.service

View file

@ -276,9 +276,6 @@ systemdsystemunit_DATA = \
dbus.socket
endif
MAN_IN_FILES=dbus-daemon.1.in
man_MANS = dbus-daemon.1
#### Extra dist
EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)
EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)

View file

@ -12,7 +12,9 @@ AC_CANONICAL_HOST
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
AM_INIT_AUTOMAKE([1.9 tar-ustar])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability])
AM_CONFIG_HEADER(config.h)
# Honor aclocal flags
@ -1311,7 +1313,7 @@ if test x$enable_doxygen_docs = xyes; then
fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT(yes)
AC_MSG_RESULT($enable_doxygen_docs)
### XML Documentation
@ -1340,7 +1342,15 @@ if test x$enable_xml_docs = xyes; then
fi
AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
AC_MSG_RESULT(yes)
AC_MSG_RESULT($enable_xml_docs)
AC_PATH_PROG([MAN2HTML], [man2html])
AC_ARG_VAR([MAN2HTML], [Path to man2html (optional)])
AM_CONDITIONAL(DBUS_HAVE_MAN2HTML, test x$MAN2HTML != x)
AM_CONDITIONAL(DBUS_CAN_UPLOAD_DOCS,
test x$enable_doxygen_docs = xyes -a x$enable_xml_docs = xyes -a \
x$MAN2HTML != x)
#### Have to go $localstatedir->$prefix/var->/usr/local/var
@ -1577,7 +1587,6 @@ bus/session.conf
bus/messagebus
bus/messagebus-config
bus/rc.messagebus
bus/dbus-daemon.1
bus/dbus.service
bus/dbus.socket
Makefile
@ -1587,6 +1596,7 @@ tools/Makefile
test/Makefile
test/name-test/Makefile
doc/Makefile
doc/dbus-daemon.1
dbus-1.pc
test/data/valid-config-files/debug-allow-all.conf
test/data/valid-config-files/debug-allow-all-sha1.conf
@ -1628,8 +1638,9 @@ echo "
64-bit int: ${DBUS_INT64_TYPE}
32-bit int: ${DBUS_INT32_TYPE}
16-bit int: ${DBUS_INT16_TYPE}
Doxygen: ${DOXYGEN}
xmlto: ${XMLTO}"
Doxygen: ${DOXYGEN:-not found}
xmlto: ${XMLTO:-not found}
man2html: ${MAN2HTML:-not found}"
echo "
Maintainer mode: ${USE_MAINTAINER_MODE}

1
dbus/.gitignore vendored
View file

@ -14,3 +14,4 @@ dbus-arch-deps.h
dbus-glib-error-enum.h
*.gcno
*.gcda
versioninfo.rc

4
doc/.gitignore vendored
View file

@ -2,6 +2,7 @@
.libs
Makefile
Makefile.in
*.1.html
*.lo
*.la
*.o
@ -10,3 +11,6 @@ dbus-specification.html
dbus-test-plan.html
dbus-tutorial.html
dbus-faq.html
dbus-daemon.1
dbus-docs
dbus-docs.tar.gz

View file

@ -1,16 +1,41 @@
EXTRA_DIST= \
busconfig.dtd \
diagram.png \
diagram.svg \
introspect.dtd \
dbus-faq.xml \
dbus-specification.xml \
dbus-test-plan.xml \
dbus-tutorial.xml \
dcop-howto.txt \
file-boilerplate.c \
introspect.xsl \
system-activation.txt
man_MANS = \
dbus-cleanup-sockets.1 \
dbus-daemon.1 \
dbus-launch.1 \
dbus-monitor.1 \
dbus-send.1 \
dbus-uuidgen.1
MAN_IN_FILES = dbus-daemon.1.in
MAN_HTML_FILES = \
dbus-cleanup-sockets.1.html \
dbus-daemon.1.html \
dbus-launch.1.html \
dbus-monitor.1.html \
dbus-send.1.html \
dbus-uuidgen.1.html
DTDS = \
busconfig.dtd \
introspect.dtd
STATIC_DOCS = \
diagram.png \
diagram.svg \
dbus-faq.xml \
dbus-specification.xml \
dbus-test-plan.xml \
dbus-tutorial.xml \
dcop-howto.txt \
introspect.xsl \
system-activation.txt \
$(DTDS)
EXTRA_DIST = \
file-boilerplate.c \
$(STATIC_DOCS) \
$(MAN_IN_FILES) $(man_MANS)
HTML_FILES= \
dbus-faq.html \
@ -19,7 +44,7 @@ HTML_FILES= \
dbus-tutorial.html
if DBUS_XML_DOCS_ENABLED
all-local: $(HTML_FILES)
all-local:: $(HTML_FILES)
EXTRA_DIST += $(HTML_FILES)
@ -37,5 +62,67 @@ dbus-faq.html: dbus-faq.xml
endif
if DBUS_DOXYGEN_DOCS_ENABLED
# Use the index as a proxy for the entire doc tree.
DOXYGEN_HTML_INDEX = api/html/index.html
all-local:: $(DOXYGEN_HTML_INDEX)
$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch])
$(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile
endif
if DBUS_HAVE_MAN2HTML
all-local:: $(MAN_HTML_FILES)
%.1.html: %.1
$(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ )
endif
if DBUS_CAN_UPLOAD_DOCS
BONUS_FILES = \
$(top_srcdir)/README \
$(top_srcdir)/HACKING \
$(top_srcdir)/AUTHORS \
$(top_srcdir)/NEWS \
$(top_srcdir)/COPYING \
$(top_srcdir)/ChangeLog
dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX)
$(AM_V_at)rm -rf $@
$(AM_V_GEN)mkdir -p $@/api
$(AM_V_at)cp $(STATIC_DOCS) $@
$(AM_V_at)cp $(HTML_FILES) $@
$(AM_V_at)cp $(MAN_HTML_FILES) $@
$(AM_V_at)cp $(BONUS_FILES) $@
$(AM_V_at)cp -r api/html $@/api
dbus-docs.tar.gz: dbus-docs
$(AM_V_GEN)tar czf $@ $<
DOC_SERVER = dbus.freedesktop.org
DOC_WWW_DIR = /srv/dbus.freedesktop.org/www
SPECIFICATION_SERVER = specifications.freedesktop.org
SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0
maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)
rsync -rvzP --chmod=Dg+s,ug+rwX,o=rX \
dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)
else
maintainer-upload-docs:
@echo "Can't upload documentation! Re-run configure with"
@echo " --enable-doxygen-docs --enable-xml-docs"
@echo "and ensure that man2html is installed."
@false
endif
clean-local:
rm -rf api
rm -rf dbus-docs
rm -f *.1.html
maintainer-clean-local:
rm -f $(HTML_FILES)

View file

@ -122,7 +122,7 @@ dist-hook:
## copy tests to builddir so that generated tests and static tests
## are all in one place.
all-local:
for D in $(TESTDIRS); do \
$(AM_V_at)for D in $(TESTDIRS); do \
test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
done ; \
if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \

View file

@ -2,9 +2,13 @@
.libs
Makefile
Makefile.in
echo-error-output.tmp
run-with-tmp-session-bus.conf
test-ids
test-names
test-pending-call-dispatch
test-pending-call-timeout
test-privserver
test-privserver-client
test-shutdown
test-threads-init
test-ids
run-with-tmp-session-bus.conf

View file

@ -48,8 +48,7 @@ dbus_uuidgen_LDFLAGS=@R_DYNAMIC_LDFLAG@
dbus_launch_LDADD= $(DBUS_X_LIBS) $(DBUS_CLIENT_LIBS)
dbus_launch_LDFLAGS=@R_DYNAMIC_LDFLAG@
man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1 dbus-uuidgen.1
EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh strtoll.c strtoull.c
EXTRA_DIST = run-with-tmp-session-bus.sh strtoll.c strtoull.c
CLEANFILES = \
run-with-tmp-session-bus.conf

View file

@ -1,56 +0,0 @@
#! /bin/bash
function die()
{
echo $* 2>&1
exit 1
}
if test -n "$FDUSER" ; then
echo "Using freedesktop.org account $FDUSER"
user="$FDUSER@"
else
echo "Using freedesktop.org account from ~/.ssh/config, or local username"
fi
CHECKOUTDIR=`mktemp -d || echo /tmp/dbus-for-docs`
export CVSROOT=":ext:${user}cvs.freedesktop.org:/cvs/dbus"
cd $CHECKOUTDIR || die "could not changedir to $CHECKOUTDIR"
echo "Checking out to directory "`pwd`
/bin/rm -rf dbus/doc || true ## get rid of old doxygen, etc.
cvs co dbus || die "failed to cvs update"
cd dbus || die "could not cd to dbus"
echo "Configuring and building docs"
## the configure flags are explicit so if you lack xmlto, etc.
## you won't fail to update those docs
./autogen.sh --enable-xml-docs=yes --enable-doxygen-docs=yes || die "could not autogen"
doxygen Doxyfile || die "could not run Doxygen"
make -C doc || die "could not build docs"
MANFILES=`find -name "dbus*.1"`
for M in $MANFILES ; do
BASENAME=`basename $M`
echo "Converting $M to $BASENAME.html"
man2html $M > doc/$BASENAME.html
done
echo "Packing docs into tarball"
cp README HACKING AUTHORS NEWS COPYING ChangeLog doc/ || die "could not copy in assorted files"
tar cfz dbus-docs.tar.gz doc/*.dtd doc/*.xsl doc/*.xml doc/*.html doc/*.txt doc/api/html/*.html doc/api/html/*.css doc/api/html/*.png doc/api/html/*.gif doc/HACKING doc/AUTHORS doc/NEWS doc/ChangeLog doc/TODO doc/README doc/COPYING doc/*.png doc/*.svg || die "could not tar up docs"
tar tfz dbus-docs.tar.gz | sort > tarball.list || die "could not list tarball contents"
find doc -not -type d | grep -v CVS | grep -v -E '.~[0-9.]+~' | grep -v Makefile | grep -vE '.c$' | grep -v man3dbus | grep -v .cvsignore | sort > filesystem.list || die "could not list doc/* contents"
diff -u filesystem.list tarball.list || die "some files were not included"
echo "Uploading docs to server"
scp dbus-docs.tar.gz "${user}"dbus.freedesktop.org:
ssh "${user}"dbus.freedesktop.org '(cd /srv/dbus.freedesktop.org/www/ && /bin/cp -f ~/dbus-docs.tar.gz . && tar zxf dbus-docs.tar.gz && echo "Successfully unpacked tarball on server")'
echo "Uploading DTD to server"
scp -p doc/introspect.dtd "${user}"dbus.freedesktop.org:/srv/specifications.freedesktop.org/www/dbus/1.0/introspect.dtd