freebsd-dev/release/doc/share/mk/doc.relnotes.mk
Simon L. B. Nielsen 4e702f5b14 Auto generate the device listings in the Hardware Notes based on
manual pages, to avoid duplicating work between the Hardware Notes and
manual pages.

Each text line in the output from the manual page parser is generated
as a SGML entity, making it possible for translators to only translate
lines which actually contains English text (this neat idea came from
hrs).

To determine which drivers are usable on which architectures the
dev.archlist.txt file is used to explicitly list this.  It it an
imperfect solution, but the best I have been able to come up with for
now.

This commit converts most of the devices which has a section 4 manual
page with a HARDWARE section to be the new auto generated format.

Reviewed in principle by:	ru, hrs, trhodes
Good ideas for improvements:	hrs
No objections:			-doc, re
2004-08-03 22:12:45 +00:00

50 lines
1.5 KiB
Makefile

# $FreeBSD$
DOC_PREFIX?= ${RELN_ROOT}/../../../doc
# Find the RELNOTESng document catalogs
EXTRA_CATALOGS+= ${RELN_ROOT}/${LANGCODE}/share/sgml/catalog
EXTRA_CATALOGS+= ${RELN_ROOT}/share/sgml/catalog
# Use the appropriate architecture-dependent RELNOTESng stylesheet
DSLHTML?= ${RELN_ROOT}/share/sgml/default.dsl
DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl
#
# Tweakable Makefile variables
#
# INCLUDE_HISTORIC Used by relnotes document only. When set,
# causes all release notes entries to be printed,
# even those marked as "historic". If not set
# (the default), only print "non-historic"
# release note entries. To designate a release
# note entry as "historic", add a role="historic"
# attribute to the applicable element(s).
#
.if defined(INCLUDE_HISTORIC)
JADEFLAGS+= -iinclude.historic
.else
JADEFLAGS+= -ino.include.historic
.endif
#
# Automatic device list generation:
#
.if exists(${RELN_ROOT}/../man4)
MAN4DIR?= ${RELN_ROOT}/../man4
.elif exists(${RELN_ROOT}/../../man4)
MAN4DIR?= ${RELN_ROOT}/../../man4
.else
MAN4DIR?= ${RELN_ROOT}/../../share/man/man4
.endif
MAN4PAGES?= ${MAN4DIR}/*.4 ${MAN4DIR}/man4.*/*.4
ARCHLIST?= ${RELN_ROOT}/share/misc/dev.archlist.txt
DEV-AUTODIR= ${RELN_ROOT:S/${.CURDIR}/${.OBJDIR}/}/share/sgml
CLEANFILES+= ${DEV-AUTODIR}/dev-auto.sgml ${DEV-AUTODIR}/catalog-auto
# Dependency that the article makefiles can use to pull in
# dev-auto.sgml.
${DEV-AUTODIR}/catalog-auto ${DEV-AUTODIR}/dev-auto.sgml: ${MAN4PAGES} \
${ARCHLIST} ${RELN_ROOT}/share/misc/man2hwnotes.pl
cd ${RELN_ROOT}/share/sgml && make dev-auto.sgml