diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-02-21 19:19:48 -0600 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-02-26 08:03:57 -0600 |
commit | 94ca0708a2c3151fe7e92f97bb4ebeb65cb029c9 (patch) | |
tree | d72e64da49e642b86c63d0b0bf785843b83c4924 | |
parent | doc: Update to build info format with texinfo 4.13 and 5.0 (diff) | |
download | rtems-94ca0708a2c3151fe7e92f97bb4ebeb65cb029c9.tar.bz2 |
doc: Support texi2any and texi2html
This was tested with texi2html-1.82-5.1.el6.noarch and
a locally built texinfo 5.0. These are completely different
implementations and require different invocations.
The Makefile dependencies appear to work but are likely not
perfect at this point. The key point is that the autoconf
probe detects which to use and responds accordingly with
preference given to texi2any.
-rw-r--r-- | doc/configure.ac | 11 | ||||
-rw-r--r-- | doc/index.html.in | 24 | ||||
-rw-r--r-- | doc/main.am | 8 | ||||
-rw-r--r-- | doc/project.am | 36 | ||||
-rw-r--r-- | doc/texi2any_init.in | 20 |
5 files changed, 80 insertions, 19 deletions
diff --git a/doc/configure.ac b/doc/configure.ac index eaa50e984e..7c8a69c7fc 100644 --- a/doc/configure.ac +++ b/doc/configure.ac @@ -75,8 +75,18 @@ AC_PROG_LN_S AC_CHECK_PROGS(PERL,perl) +AC_CHECK_PROGS(TEXI2ANY,texi2any) +AC_SUBST(TEXI2ANY) +AM_CONDITIONAL(USE_TEXI2ANY, + test "$enable_html" = "yes" \ + && test x"$TEXI2ANY" != x"") + AC_CHECK_PROGS(TEXI2HTML,texi2html) AC_SUBST(TEXI2HTML) +AM_CONDITIONAL(USE_TEXI2HTML, + test "$enable_html" = "yes" \ + && test x"$TEXI2ANY" = x"" \ + && test x"$TEXI2HTML" != x"") AC_CHECK_PROGS(GS,gs) AM_CONDITIONAL(GS,test x"$GS" != x"") @@ -169,5 +179,6 @@ new_chapters/Makefile cpu_supplement/Makefile shell/Makefile texi2html_init +texi2any_init ]) AC_OUTPUT diff --git a/doc/index.html.in b/doc/index.html.in index 0eb9c71943..824a9724b7 100644 --- a/doc/index.html.in +++ b/doc/index.html.in @@ -16,7 +16,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/started.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="started/started.html"> + <A HREF="started/index.html"> Getting Started with RTEMS</A> </LI> @@ -26,7 +26,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/c_user.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="c_user/c_user.html"> + <A HREF="c_user/index.html"> RTEMS Applications C User's Guide</A> </LI> @@ -36,7 +36,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/posix_users.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="posix_users/posix_users.html"> + <A HREF="posix_users/index.html"> RTEMS POSIX API User's Guide</A> </LI> @@ -46,7 +46,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/networking.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="networking/networking.html"> + <A HREF="networking/index.html"> RTEMS TCP/IP Networking Supplement</A> </LI> @@ -56,7 +56,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/shell.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="shell/shell.html"> + <A HREF="shell/index.html"> RTEMS Shell User's Guide</A> </LI> </MENU> @@ -68,7 +68,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/ada_user.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="ada_user/ada_user.html"> + <A HREF="ada_user/index.html"> RTEMS Applications Ada User's Guide</A> </LI> </MENU> @@ -81,7 +81,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/bsp_howto.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="bsp_howto/bsp_howto.html"> + <A HREF="bsp_howto/index.html"> RTEMS BSP and Device Driver Development Guide</A> </LI> @@ -91,7 +91,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/cpu_supplement.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="cpu_supplement/cpu_supplement.html"> + <A HREF="cpu_supplement/index.html"> RTEMS CPU Architecture Supplement</A> </LI> @@ -101,7 +101,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/develenv.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="develenv/develenv.html"> + <A HREF="develenv/index.html"> RTEMS Development Environment Guide</A> </LI> @@ -111,7 +111,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/porting.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="porting/porting.html"> + <A HREF="porting/index.html"> RTEMS Porting Guide</A> </LI> @@ -121,7 +121,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/posix1003_1.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="posix1003_1/posix1003_1.html"> + <A HREF="posix1003_1/index.html"> RTEMS POSIX 1003.1 Compliance Guide</A> </LI> @@ -131,7 +131,7 @@ <IMG SRC="images/ps.gif" HEIGHT=18 WIDTH=16></A> <A HREF="../dvi/filesystem.dvi"> <IMG SRC="images/dvi.gif" HEIGHT=18 WIDTH=16></A> - <A HREF="filesystem/filesystem.html"> + <A HREF="filesystem/index.html"> RTEMS Filesystem Design Guide</A> </LI> </MENU> diff --git a/doc/main.am b/doc/main.am index 3df1dd66ed..c19f7e6a25 100644 --- a/doc/main.am +++ b/doc/main.am @@ -4,5 +4,13 @@ endif TEXI2HTML_ARGS=\ -D use-html --split node \ +-o ./ \ +--top-file index.html \ --init-file=$(top_builddir)/texi2html_init \ -I $(srcdir) -I $(top_srcdir) -I $(top_builddir) -I . + +TEXI2ANY_ARGS=\ +--html -D use-html --split node \ +-o ./ \ +--init-file=$(top_builddir)/texi2any_init \ +-I $(srcdir) -I $(top_srcdir) -I $(top_builddir) -I . diff --git a/doc/project.am b/doc/project.am index fcc96c14b4..6a8778bfc5 100644 --- a/doc/project.am +++ b/doc/project.am @@ -1,4 +1,4 @@ -# HACK: makeinfo is locale sensitive +# HACK: makeinfo is locale sensitive LANG=C SUFFIXES = .t @@ -37,20 +37,42 @@ CLEANFILES += $(PROJECT).pdf MOSTLYCLEANFILES += $(PDF_IMAGES) -## HTML +## HTML SUFFIXES += .html -$(PROJECT)*.html: $(PROJECT).texi $($(PROJECT)_TEXINFOS) +if USE_HTML + +<<<<<<< HEAD +html_project_DATA = +======= +html_project_DATA = +MOSTLYCLEANFILES += $(PROJECT)*.html +html_project_DATA += *.html +>>>>>>> bdf959d... doc/project.am: Fix whitespace at EOL + +if USE_TEXI2HTML +index.html $(PROJECT)*.html: $(PROJECT).texi $($(PROJECT)_TEXINFOS) rm -rf $(PROJECT).html $(TEXI2HTML) $(TEXI2HTML_ARGS) --menu $< $< -rm -rf $(PROJECT) MOSTLYCLEANFILES += $(PROJECT)*.html -## Common installation points -if USE_HTML -html_project_DATA = $(PROJECT)*.html -endif +html_project_DATA += index.html $(PROJECT)*.html +endif # USE_TEXI2HTML + +if USE_TEXI2ANY +index.html *.html: $(PROJECT).texi $($(PROJECT)_TEXINFOS) + rm -rf $(PROJECT).html + $(TEXI2ANY) $(TEXI2ANY_ARGS) $< + +MOSTLYCLEANFILES += $(PROJECT)/*.html + +html_project_DATA += *.html +endif # USE_TEXI2ANY + +endif # USE_HTML + if USE_DVI dvi_DATA = $(PROJECT).dvi diff --git a/doc/texi2any_init.in b/doc/texi2any_init.in new file mode 100644 index 0000000000..d70517ea8b --- /dev/null +++ b/doc/texi2any_init.in @@ -0,0 +1,20 @@ +set_from_init_file ('AFTER_BODY_OPEN', +'<A HREF="http://www.rtems.com" target="Text Frame"> +<IMG align=right BORDER=0 SRC="../images/rtems_logo.jpg" ALT="RTEMS +Logo"> </A> +<H1>RTEMS @VERSION@ On-Line Library</H1> +'); + +texinfo_register_handler('setup', \&add_button); + +my $button_text = '<a href="../dir.html">Directory</a>'; +sub add_button($) +{ + my $self = shift; + foreach my $button_type ('SECTION_BUTTONS', 'CHAPTER_BUTTONS', + 'MISC_BUTTONS', 'TOP_BUTTONS') { + my $buttons = $self->get_conf($button_type); + push @$buttons, \$button_text; + } + return 1; +} |