From c8e92c77d8495d73dcb7d27c942c7b8f168e514e Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Tue, 2 Jan 2001 01:33:01 +0000 Subject: [PATCH] Added checking for all the tools used to make documentation. Original commit message from CVS: Added checking for all the tools used to make documentation. If documentation cannot be generated, whatever is available will still be installed. videosink/imagetest is now a check_PROGRAM --- Makefile.am | 4 ++-- configure.in | 16 +++++++++++++--- docs/Makefile.am | 8 +------- docs/gst/Makefile.am | 15 +++++---------- docs/libs/Makefile.am | 2 +- docs/manuals.mak | 30 ++++++++++++++++++++++++++---- 6 files changed, 48 insertions(+), 27 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8f435693c3..d13e8b0ede 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,10 +5,10 @@ else SUBDIRS_LGG = endif -SUBDIRS = include gst libs plugins tools test tests examples $(SUBDIRS_LGG) +SUBDIRS = include gst libs plugins tools test tests examples $(SUBDIRS_LGG) docs # These are all the possible subdirs -DIST_SUBDIRS = include gst libs plugins tools test tests examples gstplay editor +DIST_SUBDIRS = include gst libs plugins tools test tests examples gstplay editor docs bin_SCRIPTS = gstreamer-config diff --git a/configure.in b/configure.in index d84a1ffe92..30d85795a2 100644 --- a/configure.in +++ b/configure.in @@ -260,11 +260,20 @@ AC_CHECK_HEADER(lame.h, :, HAVE_LIBLAME=no) dnl check for gtkdoc AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scanobj, :, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scan, :, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mktmpl, :, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, :, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkhtml, :, false) +AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-fixxref, :, false) -dnl check for db2html +dnl check for docbook tools AC_CHECK_PROG(HAVE_DB2HTML, db2html, true, false) AC_CHECK_PROG(HAVE_DB2PS, db2ps, true, false) -AC_CHECK_PROG(HAVE_DB2PDF, db2pdf, true, false) +AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, true, false) + +dnl check for image conversion tool +AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false) dnl ###################################################################### @@ -432,8 +441,9 @@ AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes") AM_CONDITIONAL(HAVE_LIBXV, test "x$HAVE_LIBXV" = "xyes") AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC) AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML) -AM_CONDITIONAL(HAVE_DB2PDF, $HAVE_DB2PDF) AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS) +AM_CONDITIONAL(HAVE_PS2PDF, $HAVE_PS2PDF) +AM_CONDITIONAL(HAVE_FIG2DEV, $HAVE_FIG2DEV) AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes") AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes") diff --git a/docs/Makefile.am b/docs/Makefile.am index cee12c2ee6..8df09a1ce4 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,9 +1,3 @@ -SUBDIRS = manual fwg - -if HAVE_GTK_DOC - SUBDIRS += gst libs -endif - -DIST_SUBDIRS = gst manual libs fwg +SUBDIRS = manual fwg gst libs EXTRA_DIST = random slides manuals.mak diff --git a/docs/gst/Makefile.am b/docs/gst/Makefile.am index 8081d8f67a..53431b99e6 100644 --- a/docs/gst/Makefile.am +++ b/docs/gst/Makefile.am @@ -64,7 +64,6 @@ gstreamer_docdir = $(HTML_DIR) gstreamer_doc_DATA = \ gstreamer.html \ gstreamer.types \ - gstreamer-decl.txt \ gstreamer.hierarchy \ gstreamer-sections.txt @@ -87,17 +86,13 @@ sgml/gstreamer-doc.bottom: $(tmpl_sources) $(MAKE) sgml gstreamer-decl.txt: - $(MAKE) scan + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="" scanobj: $(srcdir)/$(DOC_MODULE).types -CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" gtkdoc-scanobj --module=$(DOC_MODULE) gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) - -scan: - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="" - -tmpl: scanobj scan +tmpl: scanobj gstreamer-decl.txt gtkdoc-mktmpl --module=$(DOC_MODULE) sgml: tmpl @@ -113,7 +108,7 @@ clean-local: maintainer-clean-local: clean rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt -install-data-local: +install-data-local: gstreamer.html $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) (installfiles=`echo $(srcdir)/html/*.html`; \ if test "$$installfiles" = '$(srcdir)/html/*.html'; \ @@ -129,7 +124,7 @@ install-data-local: gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \ fi) -dist-hook: +dist-hook: gstreamer.html mkdir $(distdir)/html mkdir $(distdir)/sgml mkdir $(distdir)/tmpl @@ -138,4 +133,4 @@ dist-hook: -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml -.PHONY : html sgml templates scan +.PHONY : html sgml tmpl diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am index 23f27167d2..765237b7ad 100644 --- a/docs/libs/Makefile.am +++ b/docs/libs/Makefile.am @@ -59,7 +59,7 @@ install-data-local: html gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \ fi) -uninstall-local: html +uninstall-local: @echo '-- Uninstalling '$(DESTDIR)$(TARGET_DIR) ; \ $(RM) -rf $(DESTDIR)$(TARGET_DIR) diff --git a/docs/manuals.mak b/docs/manuals.mak index 4f3188850d..91940a63fb 100644 --- a/docs/manuals.mak +++ b/docs/manuals.mak @@ -10,14 +10,34 @@ PDFFILES=$(manualname).pdf PSFILES=$(manualname).ps +if HAVE_FIG2DEV $(manualname)/$(htmlname): $(sgml_files) $(png_files) +else +$(manualname)/$(htmlname): $(sgml_files) +endif +if HAVE_DB2HTML db2html $(manualname).sgml +else + echo "Can't build $@: don't have db2html tool" +endif $(manualname).pdf: $(manualname).ps - ps2pdf $< $@ +if HAVE_PS2PDF + @if [ -r $< ] ; then ps2pdf $< $@ ; fi +else + echo "Can't build $@: don't have ps2pdf tool" +endif +if HAVE_FIG2DEV $(manualname).ps: $(sgml_files) $(eps_files) - db2ps $(manualname).sgml +else +$(manualname).ps: $(sgml_files) +endif +if HAVE_PS2PDF + @if [ -r $< ] ; then db2ps $(manualname).sgml ; fi +else + echo "Can't build $@: don't have db2ps tool" +endif images : mkdir images @@ -75,8 +95,9 @@ htmlinst: $(INSTALL_DATA) $(manualname)/*.html $(DESTDIR)$(docdatadir)/$(manualname) ; \ for a in "x" $(png_files); do \ if [ "x$$a" != "xx" ] ; then \ + if [ -r $$a ] ; then \ $(INSTALL_DATA) $$a $(DESTDIR)$(docdatadir)/$(manualname)/images ; \ - fi; done \ + fi; fi; done \ else \ if [ -r $(srcdir)/$(manualname)/$(htmlname) ] ; then \ echo "Installing $(srcdir)/$(manualname)" ; \ @@ -85,8 +106,9 @@ htmlinst: $(INSTALL_DATA) $(srcdir)/$(manualname)/*.html $(DESTDIR)$(docdatadir)/$(manualname) ; \ for a in "x" $(png_files); do \ if [ "x$$a" != "xx" ] ; then \ + if [ -r $$a ] ; then \ $(INSTALL_DATA) $$a $(DESTDIR)$(docdatadir)/$(manualname)/images ; \ - fi; done \ + fi; fi; done \ else \ echo "NOT installing HTML documentation: not present, and can't generate" ; \ fi \