2004-05-06 16:39:05 +02:00
|
|
|
# $NetBSD: catalogs.mk,v 1.8 2004/05/06 14:39:05 minskim Exp $
|
2003-01-29 21:21:06 +01:00
|
|
|
#
|
|
|
|
# This Makefile fragment is intended to be included by packages that install
|
|
|
|
# catalog files or DTDs. It takes care of registering them into the right
|
|
|
|
# database.
|
|
|
|
#
|
|
|
|
# The following variables can be defined by a package to automatically
|
|
|
|
# register catalog files:
|
|
|
|
# SGML_CATALOGS - List of SGML catalogs to register into share/sgml/catalog.
|
|
|
|
# XML_CATALOGS - List of XML catalogs to register into share/xml/catalog.
|
|
|
|
#
|
|
|
|
# If you need to call xmlcatmgr with very specific arguments, you can use
|
|
|
|
# the following variables. Add three words each time; they are fed to
|
|
|
|
# xmlcatmgr in groups of three when calling the `add' action.
|
|
|
|
# SGML_ENTRIES - Extra arguments used to add entries to the SGML catalog.
|
|
|
|
# XML_ENTRIES - Extra arguments used to add entries to the XML catalog.
|
|
|
|
#
|
|
|
|
|
|
|
|
.if !defined(XMLCATMGR_CATALOGS_MK)
|
|
|
|
XMLCATMGR_CATALOGS_MK= # defined
|
|
|
|
|
2004-02-01 11:17:21 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2003-01-29 21:21:06 +01:00
|
|
|
# Catalogs to be registered.
|
|
|
|
SGML_CATALOGS?=
|
|
|
|
XML_CATALOGS?=
|
|
|
|
|
|
|
|
# Single entries to be added to catalogs.
|
|
|
|
SGML_ENTRIES?=
|
|
|
|
XML_ENTRIES?=
|
|
|
|
|
|
|
|
# Convert SGML_CATALOGS files into arguments for SGML_ENTRIES.
|
|
|
|
.if !empty(SGML_CATALOGS)
|
2004-02-01 11:17:21 +01:00
|
|
|
. for c in ${SGML_CATALOGS}
|
2003-01-29 21:21:06 +01:00
|
|
|
SGML_ENTRIES+= CATALOG ${PREFIX:=$c} --
|
2004-02-01 11:17:21 +01:00
|
|
|
. endfor
|
2003-01-29 21:21:06 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# Convert XML_CATALOGS files into arguments for XML_ENTRIES.
|
|
|
|
.if !empty(XML_CATALOGS)
|
2004-02-01 11:17:21 +01:00
|
|
|
. for c in ${XML_CATALOGS}
|
2003-01-29 21:21:06 +01:00
|
|
|
XML_ENTRIES+= nextCatalog ${PREFIX:=$c} --
|
2004-02-01 11:17:21 +01:00
|
|
|
. endfor
|
2003-01-29 21:21:06 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# If there are any entries to register, export required variables and
|
|
|
|
# use bsd.pkg.install.mk.
|
|
|
|
.if !empty(SGML_ENTRIES) || !empty(XML_ENTRIES)
|
|
|
|
FILES_SUBST+= XMLCATMGR="${XMLCATMGR}"
|
|
|
|
FILES_SUBST+= SGML_CATALOG="${BUILDLINK_PREFIX.xmlcatmgr}/share/sgml/catalog"
|
|
|
|
FILES_SUBST+= XML_CATALOG="${BUILDLINK_PREFIX.xmlcatmgr}/share/xml/catalog"
|
2004-05-06 16:39:05 +02:00
|
|
|
FILES_SUBST+= SGML_ENTRIES=${SGML_ENTRIES:Q}
|
|
|
|
FILES_SUBST+= XML_ENTRIES=${XML_ENTRIES:Q}
|
2003-01-29 21:21:06 +01:00
|
|
|
INSTALL_EXTRA_TMPL+= ../../textproc/xmlcatmgr/files/install.tmpl
|
|
|
|
DEINSTALL_EXTRA_TMPL+= ../../textproc/xmlcatmgr/files/deinstall.tmpl
|
|
|
|
USE_PKGINSTALL= YES
|
|
|
|
.endif # !empty(SGML_ENTRIES) || !empty(XML_ENTRIES)
|
|
|
|
|
2004-04-12 23:12:44 +02:00
|
|
|
PRINT_PLIST_AWK+= /^share\/(sgml|xml)\/catalog$$/ \
|
|
|
|
{ print "@comment in xmlcatmgr: " $$0; next; }
|
|
|
|
PRINT_PLIST_AWK+= /^@dirrm share\/(sgml|xml)$$/ \
|
|
|
|
{ print "@comment in xmlcatmgr: " $$0; next; }
|
|
|
|
|
2004-02-01 11:17:21 +01:00
|
|
|
.if !empty(USE_BUILDLINK3:M[yY][eE][sS])
|
2004-02-01 11:11:39 +01:00
|
|
|
. include "../../textproc/xmlcatmgr/buildlink3.mk"
|
|
|
|
.endif
|
2003-01-29 21:21:06 +01:00
|
|
|
|
|
|
|
.endif # XMLCATMGR_CATALOGS_MK
|