Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2002 22:33:26 +0000
From:      Nik Clayton <nik@freebsd.org>
To:        doc@freebsd.org
Subject:   Teaching ports/textproc/docproj/Makefile about FORMATS
Message-ID:  <20020319223326.C5971@canyon.nothing-going-on.org>

next in thread | raw e-mail | index | archive | help

--684cmtc/Pyvt2LSS
Content-Type: multipart/mixed; boundary="h13GW2gLSV2TxsNR"
Content-Disposition: inline


--h13GW2gLSV2TxsNR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Here's a diff to teach textproc/docproj/Makefile about the FORMATS
variable.  Very lightly tested.  Feedback welcome.

N
--=20
FreeBSD: The Power to Serve      http://www.freebsd.org/               (__)
FreeBSD Documentation Project    http://www.freebsd.org/docproj/    \\\'',)
                                                                      \/  \=
 ^
   --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---         .\._/=
_)

--h13GW2gLSV2TxsNR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=d
Content-Transfer-Encoding: quoted-printable

--- Makefile.org	Tue Mar 19 17:59:15 2002
+++ Makefile	Tue Mar 19 22:16:10 2002
@@ -6,50 +6,104 @@
 #
=20
 PORTNAME=3D	docproj
-PORTVERSION=3D	1.9
+PORTVERSION=3D	1.10
 CATEGORIES=3D	textproc
 MASTER_SITES=3D	# empty
 DISTFILES=3D	# empty
=20
 MAINTAINER=3D	nik@freebsd.org
=20
-# This dependency list should be kept in sync with the list of
+# Support the FORMATS variable for deciding what to depend on.
+#
+# Default to supporting HTML and TXT outputs, which seems to be the=20
+# default most people want
+FORMATS?=3D	html txt
+
+# The complete dependency list should be kept in sync with the list of
 # required ports in src/release/Makefile.inc.docports.
=20
-RUN_DEPENDS=3D	instant:${PORTSDIR}/textproc/sgmlformat \
-		tidy:${PORTSDIR}/www/tidy \
+# The basic list of dependencies, before you even decide what output forma=
t(s)
+# you want to generate
+BASE_RUN_DEPENDS=3D\
 		${PREFIX}/share/sgml/docbook/dsssl/modular:${PORTSDIR}/textproc/dsssl-do=
cbook-modular \
-		${PREFIX}/share/sgml/html/catalog:${PORTSDIR}/textproc/html \
-		${PREFIX}/share/sgml/linuxdoc:${PORTSDIR}/textproc/linuxdoc \
 		${PREFIX}/share/sgml/docbook/4.1/docbook.dtd:${PORTSDIR}/textproc/docboo=
k-410 \
 		${PREFIX}/share/sgml/iso8879:${PORTSDIR}/textproc/iso8879 \
-		${PREFIX}/share/xml/dtd/xhtml/xhtml.soc:${PORTSDIR}/textproc/xhtml \
+		${PREFIX}/bin/xsltproc:${PORTSDIR}/textproc/libxslt
+
+.if defined(WITH_OPENJADE) || ${MACHINE_ARCH} =3D=3D "alpha"
+BASE_RUN_DEPENDS+=3D   openjade:${PORTSDIR}/textproc/openjade
+.else
+BASE_RUN_DEPENDS+=3D   jade:${PORTSDIR}/textproc/jade
+.endif
+
+# List of graphics dependencies which are required by most (but not all)
+# formats
+GFX_RUN_DEPENDS=3D \
 		${PREFIX}/bin/peps:${PORTSDIR}/graphics/peps \
 		${PREFIX}/bin/pngtopnm:${PORTSDIR}/graphics/netpbm \
-		${PREFIX}/bin/links:${PORTSDIR}/www/links \
-		${PREFIX}/bin/xsltproc:${PORTSDIR}/textproc/libxslt \
 		${PREFIX}/bin/scr2png:${PORTSDIR}/graphics/scr2png
=20
-.if defined(WITH_OPENJADE) || ${MACHINE_ARCH} =3D=3D "alpha"
-RUN_DEPENDS+=3D	openjade:${PORTSDIR}/textproc/openjade
-.else
-RUN_DEPENDS+=3D	jade:${PORTSDIR}/textproc/jade
+HTML_RUN_DEPENDS=3D \
+		${GFX_RUN_DEPENDS} \
+		tidy:${PORTSDIR}/www/tidy \
+		${PREFIX}/share/sgml/html/catalog:${PORTSDIR}/textproc/html \
+		${PREFIX}/share/xml/dtd/xhtml/xhtml.soc:${PORTSDIR}/textproc/xhtml \
+
+TXT_RUN_DEPENDS=3D \
+		${HTML_RUN_DEPENDS} \
+		${PREFIX}/bin/links:${PORTSDIR}/www/links
+
+PS_RUN_DEPENDS=3D \
+		${GFX_RUN_DEPENDS} \
+		`kpsewhich -expand-var '$$TEXMFMAIN'`/web2c/jadetex.fmt:${PORTSDIR}/prin=
t/jadetex
+
+PDF_RUN_DEPENDS=3D ${PS_RUN_DEPENDS}
+
+RTF_RUN_DEPENDS=3D	# Nothing outside the base
+
+PDB_RUN_DEPENDS=3D \
+		${HTML_RUN_DEPENDS} \
+		${PREFIX}/bin/iSiloBSD:${PORTSDIR}/palm/isilo
+
+# Backwards compatability
+.if defined(JADETEX) && ${JADETEX} =3D=3D "yes"
+FORMATS+=3D html txt rtf ps pdf
 .endif
=20
-.if !defined(JADETEX)
-IS_INTERACTIVE=3D "user must set JADETEX variable to 'yes' or 'no'"
+# Turn off various options that some of the dependencies default to
+# requiring, but that aren't needed for the doc build
+.if !defined(WITHOUT_PYTHON)
+WITHOUT_PYTHON=3D	yes
 .endif
=20
-JADETEX?=3D
+RUN_DEPENDS=3D ${BASE_RUN_DEPENDS}
=20
-.if empty(JADETEX) && (make(build) || make(install))
-.BEGIN:
-	@${CAT} ${FILESDIR}/JADETEX
-	@${FALSE}
+.for _curformat in ${FORMATS}
+_cf=3D${_curformat}
+.if ${_cf} =3D=3D "html" || ${_cf} =3D=3D "html-split"
+RUN_DEPENDS+=3D ${HTML_RUN_DEPENDS}
 .endif
+.if ${_cf} =3D=3D "txt"
+RUN_DEPENDS+=3D ${TXT_RUN_DEPENDS}
+.endif
+.if ${_cf} =3D=3D "rtf"
+RUN_DEPENDS+=3D ${RTF_RUN_DEPENDS}
+.endif
+.if ${_cf} =3D=3D "ps"
+RUN_DEPENDS+=3D ${PS_RUN_DEPENDS}
+.endif
+.if ${_cf} =3D=3D "pdf"
+RUN_DEPENDS+=3D ${PDF_RUN_DEPENDS}
+.endif
+.if ${_cf} =3D=3D "pdf"
+RUN_DEPENDS+=3D ${PDB_RUN_DEPENDS}
+.endif
+.endfor
=20
-.if ${JADETEX} =3D=3D yes
-RUN_DEPENDS+=3D `kpsewhich -expand-var '$$TEXMFMAIN'`/web2c/jadetex.fmt:${=
PORTSDIR}/print/jadetex
+.if empty(FORMATS) && (make(build) || make(install))
+.BEGIN:
+	@${CAT} ${FILESDIR}/FORMATS
+	@${FALSE}
 .endif
=20
 EXTRACT_ONLY=3D	# empty

--h13GW2gLSV2TxsNR--

--684cmtc/Pyvt2LSS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjyXvLUACgkQk6gHZCw343WLTwCgkaURNbsE1qhzVDon3X3Piwc9
cEYAnRROibJWIOrn8+SA548bSWMEGLi8
=9lEs
-----END PGP SIGNATURE-----

--684cmtc/Pyvt2LSS--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020319223326.C5971>