diff --git a/release/doc/Makefile b/release/doc/Makefile
index e5919e8a76ed..51076c21309a 100644
--- a/release/doc/Makefile
+++ b/release/doc/Makefile
@@ -3,10 +3,11 @@
# The user can override the default language to build and install
# with the RELNOTES_LANG variable.
#
+SUBDIR = share/sgml
.if defined(RELNOTES_LANG) && !empty(RELNOTES_LANG)
-SUBDIR = ${RELNOTES_LANG}
+SUBDIR+= ${RELNOTES_LANG}
.else
-SUBDIR = en_US.ISO8859-1
+SUBDIR+= en_US.ISO8859-1
.endif
RELN_ROOT?= ${.CURDIR}
diff --git a/release/doc/en_US.ISO8859-1/hardware/Makefile.inc b/release/doc/en_US.ISO8859-1/hardware/Makefile.inc
index 439fdc56d7c5..37ebd11d4fce 100644
--- a/release/doc/en_US.ISO8859-1/hardware/Makefile.inc
+++ b/release/doc/en_US.ISO8859-1/hardware/Makefile.inc
@@ -5,3 +5,11 @@ DESTDIR?= ${DOCDIR}/hardware/${.CURDIR:T}
.else
DESTDIR?= ${DOCDIR}/en_US.ISO8859-1/hardware/${.CURDIR:T}
.endif
+
+# Force include of the autogenerated catalog. It has to be set
+# directly in the CATALOG variable since doc.docbook.mk check if each
+# catalog file exist for the other *CATALOG variables, and
+# catalog-auto does not exist yet when that check is performed,
+# causing catalog-auto not to be added to CATALOGS which breaks the
+# build.
+CATALOGS+= -c ${DEV-AUTODIR}/catalog-auto
diff --git a/release/doc/en_US.ISO8859-1/hardware/alpha/Makefile b/release/doc/en_US.ISO8859-1/hardware/alpha/Makefile
index 7687c4b96f34..505825cfb817 100644
--- a/release/doc/en_US.ISO8859-1/hardware/alpha/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/alpha/Makefile
@@ -15,6 +15,8 @@ SRCS+= proc-alpha.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/alpha/article.sgml b/release/doc/en_US.ISO8859-1/hardware/alpha/article.sgml
index 38ca9661e4aa..fc342a1d3e1a 100644
--- a/release/doc/en_US.ISO8859-1/hardware/alpha/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/alpha/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/en_US.ISO8859-1/hardware/amd64/Makefile b/release/doc/en_US.ISO8859-1/hardware/amd64/Makefile
index d7bc7281b120..976e97a26eda 100644
--- a/release/doc/en_US.ISO8859-1/hardware/amd64/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/amd64/Makefile
@@ -15,6 +15,8 @@ SRCS+= proc-amd64.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/amd64/article.sgml b/release/doc/en_US.ISO8859-1/hardware/amd64/article.sgml
index 868ec8123375..c40771caa26f 100644
--- a/release/doc/en_US.ISO8859-1/hardware/amd64/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/amd64/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/en_US.ISO8859-1/hardware/article.sgml b/release/doc/en_US.ISO8859-1/hardware/article.sgml
index 2f0ff87d1d72..07726807d9ac 100644
--- a/release/doc/en_US.ISO8859-1/hardware/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/article.sgml
@@ -66,25 +66,17 @@
- Adaptec AIC-6260 and AIC-6360 based boards
- (&man.aic.4; driver)
+ &hwlist.aic;
- Adaptec AHA-154X ISA and AHA-1640 MCA
- SCSI controllers and compatibles (&man.aha.4; driver)
+ &hwlist.aha;
- Adaptec AHA_174x series EISA SCSI controller in
- enhanced mode (&man.ahb.4; driver)
+ &hwlist.ahb;
- Adaptec AIC-7770, AIC-7850,
- AIC-7860, AIC-7870, AIC-7880, and AIC789x based SCSI host
- adapters (&man.ahc.4; driver)
+ &hwlist.ahc;
- Ultra-320 SCSI controllers based on the Adaptec
- AIC7901, AIC7901A, and AIC7902 Ultra320 controller chips
- (&man.ahd.4; driver)
-
+ &hwlist.ahd;
- Adaptec FSA family RAID controllers (&man.aac.4; driver)
+ &hwlist.aac;
NEC PC-9801-55, 92 and their compatible C-Bus SCSI interfaces (&man.ct.4; driver)
@@ -199,6 +191,8 @@
+ &hwlist.adw;
+
BusLogic MultiMaster W
,
C
, S
, and A
Series
Host Adapters (&man.bt.4; driver)
@@ -211,23 +205,11 @@
- DPT SmartCACHE Plus, SmartCACHE III, SmartRAID III, SmartCACHE IV and
- SmartRAID IV SCSI/RAID controllers (&man.dpt.4; driver)
+ &hwlist.dpt;
- Adaptec 21x0S/32x0S/34x0S SCSI RAID
- controllers (&man.asr.4; driver)
+ &hwlist.asr;
- Adaptec 2000S/2005S Zero-Channel RAID controllers
- (&man.asr.4; driver)
-
- Adaptec 2400A ATA-100 RAID controller
- (&man.asr.4; driver)
-
- DPT SmartRAID V and VI SCSI RAID controllers
- (&man.asr.4; driver)
-
- AMI MegaRAID Express and Enterprise family RAID controllers
- (&man.amr.4; driver)
+ &hwlist.amr;
Booting from these controllers is supported. EISA
adapters are not supported.
@@ -235,7 +217,6 @@
Booting from these controllers is not
supported due to SRM limitations.
-
Mylex DAC-family RAID controllers with 2.x, 3.x, 4.x
and 5.x firmware (&man.mlx.4; driver)
@@ -257,8 +238,7 @@
(&man.mly.4; driver)
- 3ware Escalade ATA RAID controllers (&man.twe.4; driver)
-
+ &hwlist.twe;
LSI/Symbios (formerly NCR)
53C8XX and 53C10XX PCI
@@ -274,8 +254,7 @@
adapters (&man.stg.4; driver)
- Qlogic controllers and variants (&man.isp.4; driver)
-
+ &hwlist.isp;
DTC 3290 EISA SCSI controller in 1542 emulation mode.
@@ -299,9 +278,7 @@
(&man.ida.4; driver)
- SCSI adapters utilizing the Command Interface
- for SCSI-3 Support (&man.ciss.4; driver)
-
+ &hwlist.ciss;
Intel Integrated RAID Controllers (&man.iir.4; driver)
@@ -713,7 +690,7 @@
NICs and clones for PCI, MiniPCI, and CardBus (&man.dc.4;
driver)
- ADMtek Inc. AN986-based USB Ethernet NICs (&man.aue.4; driver)
+ &hwlist.aue;
CATC USB-EL1210A-based USB Ethernet NICs (&man.cue.4; driver)
@@ -726,18 +703,15 @@
RealTek RTL8150-based USB Ethernet NICs
(&man.rue.4; driver)
- Davicom DM9601-based USB Ethernet
- NICs (&man.udav.4; driver)
+ &hwlist.udav;
DEC DC21040, DC21041, DC21140, DC21141, DC21142, and DC21143
based NICs (&man.de.4; driver)
- Fujitsu MB86960A/MB86965A based Fast Ethernet NICs
- (&man.fe.4; driver)
+ &hwlist.fe;
- Intel 82557-, 82258-, 82559-, 82550-
- or 82562-based Fast Ethernet NICs (&man.fxp.4; driver)
+ &hwlist.fxp;
Intel 82595-based Ethernet NICs (&man.ex.4; driver)
@@ -750,8 +724,7 @@
3Com 3C501 8-bit ISA Ethernet NIC
(&man.el.4; driver)
- 3Com Etherlink XL-based NICs (&man.xl.4; driver)
-
+ &hwlist.xl;
3Com 3C59X series NICs (&man.vx.4; driver)
@@ -763,9 +736,7 @@
Megahertz X-Jack Ethernet PC-Card CC-10BT (&man.sn.4;
driver)
- Xircom CreditCard adapters (16 bit) and
- workalikes (&man.xe.4; driver)
-
+ &hwlist.xe;
National Semiconductor DP8393X (SONIC) Ethernet
cards (snc driver)
@@ -783,13 +754,9 @@
LXT1001 NetCellerator controller (&man.lge.4; driver)
- Ethernet and Fast Ethernet NICs based
- on the 3Com 3XP Typhoon/Sidewinder (3CR990) chipset (&man.txp.4; driver)
-
+ &hwlist.txp;
- Gigabit Ethernet NICs based on the Broadcom BCM570x
- (&man.bge.4; driver)
-
+ &hwlist.bge;
Gigabit Ethernet NICs based on the
Intel 82542 and 82543 controller chips (&man.gx.4; and &man.em.4;
@@ -798,13 +765,12 @@
controller chips (&man.em.4; driver only)
- Sun HME and QFE Ethernet NICs (&man.hme.4; driver)
+ &hwlist.hme;
Sun GEM (Gigabit Ethernet) and ERI (Fast
Ethernet) NICs (&man.gem.4; driver)
- Myson Ethernet NICs (&man.my.4; driver)
-
+ &hwlist.my;
Broadcom BCM4401 based Fast Ethernet adapters
(&man.bfe.4; driver)
@@ -859,8 +825,7 @@
Raytheon Raylink 2.4GHz wireless adapters (&man.ray.4; driver)
- AMD Am79C930 and Harris (Intersil) based 802.11b cards (&man.awi.4; driver)
-
+ &hwlist.awi;
Atheros AR5210, AR5211, and AR5212-based
802.11a/b/g network interfaces (&man.ath.4; driver)
@@ -871,29 +836,7 @@
Miscellaneous Networks
- Cronyx Sigma synchronous / asynchronous serial
- adapters with V.35/RS-232/RS-530/RS-449 interfaces (&man.cx.4; driver)
-
-
- Cronyx Sigma-22, Sigma-24
-
-
- Cronyx Sigma-100
-
-
- Cronyx Sigma-400, Sigma-401, Sigma-404, Sigma-410, Sigma-440
-
-
- Cronyx Sigma-500
-
-
- Cronyx Sigma-703
-
-
- Cronyx Sigma-800, Sigma-801, Sigma-810, Sigma-840
-
-
-
+ &hwlist.cx;
Cronyx Tau-PCI synchronous serial adapters for PCI bus
(&man.cp.4; driver)
@@ -935,13 +878,7 @@
Granch SBNI16 SHDSL modems (&man.sbsh.4;
driver)
- SMC COM90cx6 ARCNET network adapters (cm driver)
-
-
- SMC 90c26, 90c56, and 90c66 in 90c56 compatability mode
-
-
-
+ &hwlist.cm;
diff --git a/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml b/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml
index 2f0ff87d1d72..07726807d9ac 100644
--- a/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml
@@ -66,25 +66,17 @@
- Adaptec AIC-6260 and AIC-6360 based boards
- (&man.aic.4; driver)
+ &hwlist.aic;
- Adaptec AHA-154X ISA and AHA-1640 MCA
- SCSI controllers and compatibles (&man.aha.4; driver)
+ &hwlist.aha;
- Adaptec AHA_174x series EISA SCSI controller in
- enhanced mode (&man.ahb.4; driver)
+ &hwlist.ahb;
- Adaptec AIC-7770, AIC-7850,
- AIC-7860, AIC-7870, AIC-7880, and AIC789x based SCSI host
- adapters (&man.ahc.4; driver)
+ &hwlist.ahc;
- Ultra-320 SCSI controllers based on the Adaptec
- AIC7901, AIC7901A, and AIC7902 Ultra320 controller chips
- (&man.ahd.4; driver)
-
+ &hwlist.ahd;
- Adaptec FSA family RAID controllers (&man.aac.4; driver)
+ &hwlist.aac;
NEC PC-9801-55, 92 and their compatible C-Bus SCSI interfaces (&man.ct.4; driver)
@@ -199,6 +191,8 @@
+ &hwlist.adw;
+
BusLogic MultiMaster W
,
C
, S
, and A
Series
Host Adapters (&man.bt.4; driver)
@@ -211,23 +205,11 @@
- DPT SmartCACHE Plus, SmartCACHE III, SmartRAID III, SmartCACHE IV and
- SmartRAID IV SCSI/RAID controllers (&man.dpt.4; driver)
+ &hwlist.dpt;
- Adaptec 21x0S/32x0S/34x0S SCSI RAID
- controllers (&man.asr.4; driver)
+ &hwlist.asr;
- Adaptec 2000S/2005S Zero-Channel RAID controllers
- (&man.asr.4; driver)
-
- Adaptec 2400A ATA-100 RAID controller
- (&man.asr.4; driver)
-
- DPT SmartRAID V and VI SCSI RAID controllers
- (&man.asr.4; driver)
-
- AMI MegaRAID Express and Enterprise family RAID controllers
- (&man.amr.4; driver)
+ &hwlist.amr;
Booting from these controllers is supported. EISA
adapters are not supported.
@@ -235,7 +217,6 @@
Booting from these controllers is not
supported due to SRM limitations.
-
Mylex DAC-family RAID controllers with 2.x, 3.x, 4.x
and 5.x firmware (&man.mlx.4; driver)
@@ -257,8 +238,7 @@
(&man.mly.4; driver)
- 3ware Escalade ATA RAID controllers (&man.twe.4; driver)
-
+ &hwlist.twe;
LSI/Symbios (formerly NCR)
53C8XX and 53C10XX PCI
@@ -274,8 +254,7 @@
adapters (&man.stg.4; driver)
- Qlogic controllers and variants (&man.isp.4; driver)
-
+ &hwlist.isp;
DTC 3290 EISA SCSI controller in 1542 emulation mode.
@@ -299,9 +278,7 @@
(&man.ida.4; driver)
- SCSI adapters utilizing the Command Interface
- for SCSI-3 Support (&man.ciss.4; driver)
-
+ &hwlist.ciss;
Intel Integrated RAID Controllers (&man.iir.4; driver)
@@ -713,7 +690,7 @@
NICs and clones for PCI, MiniPCI, and CardBus (&man.dc.4;
driver)
- ADMtek Inc. AN986-based USB Ethernet NICs (&man.aue.4; driver)
+ &hwlist.aue;
CATC USB-EL1210A-based USB Ethernet NICs (&man.cue.4; driver)
@@ -726,18 +703,15 @@
RealTek RTL8150-based USB Ethernet NICs
(&man.rue.4; driver)
- Davicom DM9601-based USB Ethernet
- NICs (&man.udav.4; driver)
+ &hwlist.udav;
DEC DC21040, DC21041, DC21140, DC21141, DC21142, and DC21143
based NICs (&man.de.4; driver)
- Fujitsu MB86960A/MB86965A based Fast Ethernet NICs
- (&man.fe.4; driver)
+ &hwlist.fe;
- Intel 82557-, 82258-, 82559-, 82550-
- or 82562-based Fast Ethernet NICs (&man.fxp.4; driver)
+ &hwlist.fxp;
Intel 82595-based Ethernet NICs (&man.ex.4; driver)
@@ -750,8 +724,7 @@
3Com 3C501 8-bit ISA Ethernet NIC
(&man.el.4; driver)
- 3Com Etherlink XL-based NICs (&man.xl.4; driver)
-
+ &hwlist.xl;
3Com 3C59X series NICs (&man.vx.4; driver)
@@ -763,9 +736,7 @@
Megahertz X-Jack Ethernet PC-Card CC-10BT (&man.sn.4;
driver)
- Xircom CreditCard adapters (16 bit) and
- workalikes (&man.xe.4; driver)
-
+ &hwlist.xe;
National Semiconductor DP8393X (SONIC) Ethernet
cards (snc driver)
@@ -783,13 +754,9 @@
LXT1001 NetCellerator controller (&man.lge.4; driver)
- Ethernet and Fast Ethernet NICs based
- on the 3Com 3XP Typhoon/Sidewinder (3CR990) chipset (&man.txp.4; driver)
-
+ &hwlist.txp;
- Gigabit Ethernet NICs based on the Broadcom BCM570x
- (&man.bge.4; driver)
-
+ &hwlist.bge;
Gigabit Ethernet NICs based on the
Intel 82542 and 82543 controller chips (&man.gx.4; and &man.em.4;
@@ -798,13 +765,12 @@
controller chips (&man.em.4; driver only)
- Sun HME and QFE Ethernet NICs (&man.hme.4; driver)
+ &hwlist.hme;
Sun GEM (Gigabit Ethernet) and ERI (Fast
Ethernet) NICs (&man.gem.4; driver)
- Myson Ethernet NICs (&man.my.4; driver)
-
+ &hwlist.my;
Broadcom BCM4401 based Fast Ethernet adapters
(&man.bfe.4; driver)
@@ -859,8 +825,7 @@
Raytheon Raylink 2.4GHz wireless adapters (&man.ray.4; driver)
- AMD Am79C930 and Harris (Intersil) based 802.11b cards (&man.awi.4; driver)
-
+ &hwlist.awi;
Atheros AR5210, AR5211, and AR5212-based
802.11a/b/g network interfaces (&man.ath.4; driver)
@@ -871,29 +836,7 @@
Miscellaneous Networks
- Cronyx Sigma synchronous / asynchronous serial
- adapters with V.35/RS-232/RS-530/RS-449 interfaces (&man.cx.4; driver)
-
-
- Cronyx Sigma-22, Sigma-24
-
-
- Cronyx Sigma-100
-
-
- Cronyx Sigma-400, Sigma-401, Sigma-404, Sigma-410, Sigma-440
-
-
- Cronyx Sigma-500
-
-
- Cronyx Sigma-703
-
-
- Cronyx Sigma-800, Sigma-801, Sigma-810, Sigma-840
-
-
-
+ &hwlist.cx;
Cronyx Tau-PCI synchronous serial adapters for PCI bus
(&man.cp.4; driver)
@@ -935,13 +878,7 @@
Granch SBNI16 SHDSL modems (&man.sbsh.4;
driver)
- SMC COM90cx6 ARCNET network adapters (cm driver)
-
-
- SMC 90c26, 90c56, and 90c66 in 90c56 compatability mode
-
-
-
+ &hwlist.cm;
diff --git a/release/doc/en_US.ISO8859-1/hardware/i386/Makefile b/release/doc/en_US.ISO8859-1/hardware/i386/Makefile
index 507b8ee37b5a..ab08a81a928c 100644
--- a/release/doc/en_US.ISO8859-1/hardware/i386/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/i386/Makefile
@@ -1,5 +1,4 @@
# $FreeBSD$
-
RELN_ROOT?= ${.CURDIR}/../../..
DOC?= article
@@ -15,6 +14,8 @@ SRCS+= proc-i386.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/i386/article.sgml b/release/doc/en_US.ISO8859-1/hardware/i386/article.sgml
index 3a6788983f65..c8a4bf44bcc2 100644
--- a/release/doc/en_US.ISO8859-1/hardware/i386/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/i386/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/en_US.ISO8859-1/hardware/ia64/Makefile b/release/doc/en_US.ISO8859-1/hardware/ia64/Makefile
index 3b302cc8b9a1..8896eccc6483 100644
--- a/release/doc/en_US.ISO8859-1/hardware/ia64/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/ia64/Makefile
@@ -15,6 +15,8 @@ SRCS+= article.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/ia64/article.sgml b/release/doc/en_US.ISO8859-1/hardware/ia64/article.sgml
index f6fc9ed6b283..4a188b79ef40 100644
--- a/release/doc/en_US.ISO8859-1/hardware/ia64/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/ia64/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/en_US.ISO8859-1/hardware/pc98/Makefile b/release/doc/en_US.ISO8859-1/hardware/pc98/Makefile
index 5d33ce7277a5..a4b5bc48e759 100644
--- a/release/doc/en_US.ISO8859-1/hardware/pc98/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/pc98/Makefile
@@ -15,6 +15,8 @@ SRCS+= proc-pc98.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/pc98/article.sgml b/release/doc/en_US.ISO8859-1/hardware/pc98/article.sgml
index 8c7bb176224c..205fd2b6e8b8 100644
--- a/release/doc/en_US.ISO8859-1/hardware/pc98/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/pc98/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/en_US.ISO8859-1/hardware/sparc64/Makefile b/release/doc/en_US.ISO8859-1/hardware/sparc64/Makefile
index cb8a4969b92f..4414433400da 100644
--- a/release/doc/en_US.ISO8859-1/hardware/sparc64/Makefile
+++ b/release/doc/en_US.ISO8859-1/hardware/sparc64/Makefile
@@ -15,6 +15,8 @@ SRCS+= proc-sparc64.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
+SRCS+= ${DEV-AUTODIR}/catalog-auto
+SRCS+= ${DEV-AUTODIR}/dev-auto.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/release/doc/en_US.ISO8859-1/hardware/sparc64/article.sgml b/release/doc/en_US.ISO8859-1/hardware/sparc64/article.sgml
index b4ff29d904ad..9db57489cdb1 100644
--- a/release/doc/en_US.ISO8859-1/hardware/sparc64/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/sparc64/article.sgml
@@ -9,6 +9,8 @@
%mlists;
%release;
+
+%devauto;
%sections;
diff --git a/release/doc/share/misc/dev.archlist.txt b/release/doc/share/misc/dev.archlist.txt
new file mode 100644
index 000000000000..e18429183569
--- /dev/null
+++ b/release/doc/share/misc/dev.archlist.txt
@@ -0,0 +1,63 @@
+#
+# Copyright (c) 2004 The FreeBSD Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+#
+# This file is used by man2hwnotes.pl to set which drivers are usable
+# on which architectures.
+#
+# Format:
+#
+# Empty lines, and lines beginning with "#" are ignored.
+# [,...]
+#
+aac i386,amd64
+adv i386,pc98,amd64
+adw i386,pc98,amd64
+aha i386
+ahb i386
+ahc i386,pc98,alpha,sparc64,amd64
+ahd i386,sparc64,amd64
+aic i386,pc98,amd64
+aue i386,pc98,amd64
+awi i386,pc98,amd64
+bge i386,pc98,ia64,amd64
+ciss i386,amd64
+cm i386
+cp i386,pc98
+ct pc98
+cx i386
+dpt i386,amd64
+fe i386,pc98,amd64
+hme sparc64
+isp i386,pc98,alpha,ia64,sparc64,amd64
+my i386,pc98
+twe i386
+txp i386,pc98,alpha,amd64
+udav i386,pc98,amd64
+xe i386,amd64
+xl i386,pc98,alpha,sparc64,amd64
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl
new file mode 100644
index 000000000000..915728dfc783
--- /dev/null
+++ b/release/doc/share/misc/man2hwnotes.pl
@@ -0,0 +1,353 @@
+#!/usr/bin/perl -w
+# Emacs should use -*- cperl -*- mode
+#
+# Copyright (c) 2003-2004 Simon L. Nielsen
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# Parse the list of supported hardware out of section 4 manual pages
+# and output it on stdout as SGML/DocBook entities.
+
+# The script will look for the following line in the manual page:
+# .Sh HARDWARE
+# and make an entity of the content until the line containing:
+# .Sh
+#
+# For Lists only the first line will be printed. If there are
+# arguments to the .It command, only the argument will be printed.
+
+# Usage:
+# mdoc2sgml [-l] [-d 0-6] [-a ] manualpage [manualpage ...]
+
+use strict;
+use Getopt::Std;
+use Digest::MD5 qw(md5_hex);
+
+# Section from manual page to extract
+my $hwlist_sect = "HARDWARE";
+
+# Override default archtecture list for some devices:
+my $archlist_file = "dev.archlist.txt";
+my %archlist;
+
+# Globals
+my $debuglevel = 0;
+my $only_list_out = 0; # Should only lists be generated in the output?
+my @out_lines; # Single lines
+my @out_dev; # Device entities
+
+# Getopt
+my %options = ();
+if (!getopts("a:d:l",\%options)) {
+ die("Invalid command line arguments\n");
+}
+
+if (defined($options{d})) {
+ $debuglevel = $options{d};
+}
+if (defined($options{a})) {
+ $archlist_file = $options{a};
+}
+if (defined($options{l})) {
+ $only_list_out = 1;
+}
+
+if ($debuglevel > 0) {
+ # Don't do output buffering in debug mode.
+ $| = 1;
+}
+
+load_archlist($archlist_file);
+
+if ($only_list_out) {
+ # Print the default device preamble entities
+ print "\n";
+ print "\n";
+}
+
+foreach my $page (@ARGV) {
+ dlog(2, "Parsing $page");
+ parse($page);
+
+ print join("\n", @out_lines);
+ print "\n";
+ print join("\n", @out_dev);
+ print "\n";
+
+ @out_lines = ();
+ @out_dev = ();
+}
+
+sub parse {
+ my ($manpage) = @_;
+
+ my $cur_mansection;
+ my $found_hwlist = 0;
+ my %mdocvars;
+ $mdocvars{isin_hwlist} = 0;
+ $mdocvars{isin_list} = 0;
+ $mdocvars{parabuf} = "";
+ $mdocvars{listtype} = "";
+
+ open(MANPAGE, "$manpage") || die();
+ while() {
+ chomp;
+ my $line = $_;
+
+ dlog(5, "Read '$line'");
+
+ # Find commands
+ if (s/^\.(.*)$/$1/) {
+ # Detect, and ignore, comment lines
+ if (s/^\\"(.*)$/$1/) {
+ next;
+ }
+
+ if (/^Nm "?(\w+)"?/ && !defined($mdocvars{Nm})) {
+ dlog(3, "Setting Nm to $1");
+ $mdocvars{Nm} = $1;
+
+ } elsif (/^Nm$/) {
+ if (defined($mdocvars{Nm}) && $mdocvars{Nm} ne "") {
+ parabuf_addline(\%mdocvars, "&man.".$mdocvars{Nm}.".$cur_mansection;");
+ } else {
+ dlog(2, "Warning: Bad Nm call in $manpage");
+ }
+
+ } elsif (/^Sh (.+)$/) {
+ dlog(4, "Setting section to $1");
+ my $cur_section = $1;
+
+ flush_out(\%mdocvars);
+
+ if ($cur_section =~ /^${hwlist_sect}$/) {
+ dlog(2, "Found the device section ${hwlist_sect}");
+ $mdocvars{isin_hwlist} = 1;
+ $found_hwlist = 1;
+ add_sgmltag(\%mdocvars, "&hwlist.preamble.pre; " .
+ "&man.".$mdocvars{Nm}.".$cur_mansection; " .
+ "&hwlist.preamble.post;");
+ }
+ } elsif ($mdocvars{isin_hwlist}) {
+ dlog(2, "Found a HWLIST STOP key!");
+ add_sgmltag(\%mdocvars, "'>");
+ $mdocvars{isin_hwlist} = 0;
+ }
+
+ } elsif (/^Dt ([^ ]+) ([^ ]+)/) {
+ dlog(4, "Setting mansection to $2");
+ $mdocvars{cur_manname} = lc($1);
+ $cur_mansection = $2;
+
+ } elsif (/^It ?(.*)$/) {
+ # Flush last item
+ if ($mdocvars{parabuf} ne "") {
+ add_listitem(\%mdocvars);
+ }
+ parabuf_addline(\%mdocvars, $1);
+ } elsif (/^Bl/) {
+ $mdocvars{isin_list} = 1;
+ flush_out(\%mdocvars);
+ add_sgmltag(\%mdocvars, "");
+
+ if (/-tag/) {
+ $mdocvars{listtype} = "tag";
+ # YACK! Hack for ata(4)
+ if ($mdocvars{Nm} eq "ata") {
+ $mdocvars{listtype} = "tagHACK";
+ }
+ } elsif (/-bullet/) {
+ $mdocvars{listtype} = "bullet";
+ } else {
+ $mdocvars{listtype} = "unknown";
+ }
+ dlog(2, "Listtype set to $mdocvars{listtype}");
+ } elsif (/^El/) {
+ if ($mdocvars{parabuf} ne "") {
+ add_listitem(\%mdocvars);
+ }
+
+ add_sgmltag(\%mdocvars, "");
+ $mdocvars{isin_list} = 0;
+ } elsif (/^Tn (.+)$/) {
+ # For now we print TradeName text as regular text.
+ my $txt = $1;
+ $txt =~ s/^(.+) ,$/$1,/;
+
+ parabuf_addline(\%mdocvars, $txt);
+ } elsif (/^Xr (.+) (.+)/) {
+ # We need to check if the manual page exist to avoid
+ # breaking the doc build just because of a broken
+ # reference.
+ #parabuf_addline(\%mdocvars, "&man.$1.$2;");
+ parabuf_addline(\%mdocvars, "$1($2)");
+ }
+ # Ignore all other commands
+ } else {
+ # This is then regular text
+ parabuf_addline(\%mdocvars, $_);
+ }
+ }
+ close(MANPAGE) || die("Could not close input manual page");
+ if (! $found_hwlist) {
+ dlog(1, "Hardware list not found in $manpage");
+ }
+}
+
+sub dlog {
+ my ($level, $txt) = @_;
+
+ if ($level <= $debuglevel) {
+ print STDERR "$level: $txt\n";
+ }
+}
+
+# Output a SGML tag.
+sub add_sgmltag {
+ my ($mdocvars, $txt) = (@_);
+
+ # We only care about the HW list for now.
+ if (${$mdocvars}{isin_hwlist}) {
+ push(@out_dev, $txt);
+ }
+}
+
+# Add a text entity, and return the used entity name.
+sub add_txt_ent {
+ my ($itemtxt) = (@_);
+ my ($entity_name);
+
+ # Convert mdoc(7) minus
+ $itemtxt =~ s/\\-/-/g;
+
+ $itemtxt =~ s/'/‘/g;
+
+ $entity_name = "hwlist." . md5_hex($itemtxt);
+ dlog(4, "Adding '$itemtxt' as entity $entity_name");
+ push(@out_lines, "");
+
+ return ($entity_name);
+}
+sub flush_out {
+ my ($mdocvars) = (@_);
+ my ($entity_name, $out);
+ my $para_arch = "";
+
+ if (!${$mdocvars}{isin_hwlist} || ${$mdocvars}{parabuf} eq "") {
+ return;
+ }
+
+ $entity_name = add_txt_ent(${$mdocvars}{parabuf});
+ ${$mdocvars}{parabuf} = "";
+ if(defined($archlist{${$mdocvars}{Nm}})) {
+ $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"';
+ }
+ $out = "&".$entity_name.";";
+
+ dlog(4, "Flushing parabuf");
+ add_sgmltag($mdocvars, $out);
+}
+
+# Add a new list item from the "parabuf".
+sub add_listitem {
+ my ($mdocvars) = (@_);
+ my ($listitem, $entity_name);
+ my $para_arch = "";
+
+ $entity_name = add_txt_ent(${$mdocvars}{parabuf});
+ ${$mdocvars}{parabuf} = "";
+
+ if(defined($archlist{${$mdocvars}{Nm}})) {
+ $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"';
+ }
+ $listitem = "&".$entity_name.";";
+ dlog(4, "Adding '$listitem' to out_dev");
+ push(@out_dev, $listitem);
+
+}
+
+# Add a line to the "paragraph buffer"
+sub parabuf_addline {
+ my $mdocvars = shift;
+ my ($txt) = (@_);
+
+ dlog(5, "Now in parabuf_addline");
+
+ # We only care about the HW list for now.
+ if (!${$mdocvars}{isin_hwlist}) {
+ return;
+ }
+ if ($txt eq "") {
+ return;
+ }
+
+ if ($only_list_out && !${$mdocvars}{isin_list}) {
+ return;
+ }
+
+ # We only add the first line for "tag" lists
+ if (${$mdocvars}{parabuf} ne "" && ${$mdocvars}{isin_list} &&
+ ${$mdocvars}{listtype} eq "tag") {
+ return;
+ }
+
+ if (${$mdocvars}{parabuf} ne "") {
+ ${$mdocvars}{parabuf} .= " ";
+ }
+
+ dlog(4, "Adding '$txt' to parabuf");
+
+ ${$mdocvars}{parabuf} .= $txt;
+}
+
+sub load_archlist {
+ my ($file) = (@_);
+
+ my $lineno = 0;
+
+ dlog(2, "Parsing archlist $file");
+
+ open(FILE, "$file") || die("Could not open archlist $file\n");
+ while() {
+ chomp;
+ $lineno++;
+
+ if (/^#/ || $_ eq "") {
+ next;
+ }
+
+ if (/(\w+)\t([\w,]+)/) {
+ dlog(4, "For driver $1 setting arch to $2");
+ $archlist{$1} = $2;
+ } else {
+ dlog(1, "Could not parse line $lineno");
+ }
+ }
+
+ close(FILE);
+}
diff --git a/release/doc/share/mk/doc.relnotes.mk b/release/doc/share/mk/doc.relnotes.mk
index 0335640342c1..da5dbc042735 100644
--- a/release/doc/share/mk/doc.relnotes.mk
+++ b/release/doc/share/mk/doc.relnotes.mk
@@ -26,3 +26,24 @@ 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
diff --git a/release/doc/share/sgml/Makefile b/release/doc/share/sgml/Makefile
new file mode 100644
index 000000000000..8592fd053fce
--- /dev/null
+++ b/release/doc/share/sgml/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+RELN_ROOT?= ${.CURDIR}/../..
+
+.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
+
+dev-auto.sgml: ${MAN4PAGES} ${ARCHLIST} ${RELN_ROOT}/share/misc/man2hwnotes.pl catalog-auto
+ ${PERL} ${RELN_ROOT}/share/misc/man2hwnotes.pl -a ${ARCHLIST} \
+ ${MAN4PAGES} > ${.TARGET}
+
+catalog-auto:
+ ${ECHO_CMD} 'PUBLIC "-//FreeBSD//ENTITIES Auto Generated Device Lists//EN"' \
+ '"dev-auto.sgml"' > ${.TARGET}
+
+all: dev-auto.sgml