diff options
-rw-r--r-- | release/doc/share/misc/man2hwnotes.pl | 28 | ||||
-rw-r--r-- | release/doc/share/mk/doc.relnotes.mk | 7 | ||||
-rw-r--r-- | release/doc/share/sgml/Makefile | 2 |
3 files changed, 29 insertions, 8 deletions
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl index c355ac9..75b1af2 100644 --- a/release/doc/share/misc/man2hwnotes.pl +++ b/release/doc/share/misc/man2hwnotes.pl @@ -40,7 +40,7 @@ # arguments to the .It command, only the argument will be printed. # Usage: -# man2hwnotes.pl [-l] [-d 0-6] [-a <archlist file>] [-o <outputfile>] +# man2hwnotes.pl [-cl] [-d 0-6] [-a <archlist file>] [-o <outputfile>] # <manualpage> [<manualpage> ...] use strict; @@ -55,6 +55,7 @@ my $archlist_file = "dev.archlist.txt"; my %archlist; # Globals +my $compat_mode = 0; # Enable compat for old Hardware Notes style my $debuglevel = 0; my $only_list_out = 0; # Should only lists be generated in the output? my @out_lines; # Single lines @@ -62,10 +63,13 @@ my @out_dev; # Device entities # Getopt my %options = (); -if (!getopts("a:d:lo:",\%options)) { +if (!getopts("a:cd:lo:",\%options)) { die("$!: Invalid command line arguments in ", __LINE__, "\n"); } +if (defined($options{c})) { + $compat_mode = 1; +} if (defined($options{d})) { $debuglevel = $options{d}; } @@ -367,9 +371,17 @@ sub flush_out { $entity_name = add_txt_ent(${$mdocvars}{parabuf}); ${$mdocvars}{parabuf} = ""; if(defined($archlist{${$mdocvars}{Nm}})) { - $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"'; + if ($compat_mode) { + $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"'; + } else { + $para_arch = '[' . $archlist{${$mdocvars}{Nm}} . '] '; + } + } + if ($compat_mode) { + $out = "<para".$para_arch.">&".$entity_name.";</para>"; + } else { + $out = "<para>".$para_arch."&".$entity_name.";</para>"; } - $out = "<para".$para_arch.">&".$entity_name.";</para>"; dlog(4, "Flushing parabuf"); add_sgmltag($mdocvars, $out); @@ -384,8 +396,12 @@ sub add_listitem { $entity_name = add_txt_ent(${$mdocvars}{parabuf}); ${$mdocvars}{parabuf} = ""; - if(defined($archlist{${$mdocvars}{Nm}})) { - $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"'; + if ($compat_mode) { + if(defined($archlist{${$mdocvars}{Nm}})) { + $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"'; + } + } else { + $listitem = "<listitem><para>&".$entity_name.";</para></listitem>"; } $listitem = "<listitem><para".$para_arch.">&".$entity_name.";</para></listitem>"; dlog(4, "Adding '$listitem' to out_dev"); diff --git a/release/doc/share/mk/doc.relnotes.mk b/release/doc/share/mk/doc.relnotes.mk index 2fe30d7..95d1e49 100644 --- a/release/doc/share/mk/doc.relnotes.mk +++ b/release/doc/share/mk/doc.relnotes.mk @@ -43,9 +43,14 @@ DEV-AUTODIR= ${RELN_ROOT:S/${.CURDIR}/${.OBJDIR}/}/share/sgml CLEANFILES+= ${DEV-AUTODIR}/dev-auto.sgml ${DEV-AUTODIR}/catalog-auto MAN2HWNOTES_CMD=${RELN_ROOT}/share/misc/man2hwnotes.pl +.if defined(HWNOTES_MI) +MAN2HWNOTES_FLAGS= +.else +MAN2HWNOTES_FLAGS= -c +.endif # Dependency that the article makefiles can use to pull in # dev-auto.sgml. ${DEV-AUTODIR}/catalog-auto ${DEV-AUTODIR}/dev-auto.sgml: ${MAN4PAGES} \ ${ARCHLIST} ${MAN2HWNOTES_CMD} - cd ${RELN_ROOT}/share/sgml && make dev-auto.sgml + cd ${RELN_ROOT}/share/sgml && make MAN2HWNOTES_FLAGS=${MAN2HWNOTES_FLAGS} dev-auto.sgml diff --git a/release/doc/share/sgml/Makefile b/release/doc/share/sgml/Makefile index 6860cb2..e15b141 100644 --- a/release/doc/share/sgml/Makefile +++ b/release/doc/share/sgml/Makefile @@ -6,7 +6,7 @@ RELN_ROOT?= ${.CURDIR}/../.. .include "${DOC_PREFIX}/share/mk/doc.project.mk" dev-auto.sgml: ${MAN4PAGES} ${ARCHLIST} ${MAN2HWNOTES_CMD} catalog-auto - ${PERL} ${MAN2HWNOTES_CMD} -a ${ARCHLIST} -o ${.TARGET} ${MAN4PAGES} + ${PERL} ${MAN2HWNOTES_CMD} ${MAN2HWNOTES_FLAGS} -a ${ARCHLIST} -o ${.TARGET} ${MAN4PAGES} catalog-auto: ${ECHO_CMD} 'PUBLIC "-//FreeBSD//ENTITIES Auto Generated Device Lists//EN"' \ |