diff options
Diffstat (limited to 'v4l2-spec/Makefile')
-rw-r--r-- | v4l2-spec/Makefile | 59 |
1 files changed, 49 insertions, 10 deletions
diff --git a/v4l2-spec/Makefile b/v4l2-spec/Makefile index 616445137..f593faccd 100644 --- a/v4l2-spec/Makefile +++ b/v4l2-spec/Makefile @@ -5,6 +5,7 @@ SHELL=/bin/bash SGMLS = \ biblio.sgml \ capture.c.sgml \ + keytable.c.sgml \ v4l2grab.c.sgml \ common.sgml \ compat.sgml \ @@ -22,6 +23,7 @@ SGMLS = \ dev-teletext.sgml \ driver.sgml \ libv4l.sgml \ + remote_controllers.sgml \ entities.sgml \ fdl-appendix.sgml \ func-close.sgml \ @@ -119,8 +121,12 @@ WARN = #WARN = -w all -w duplicate -w net # Stylesheet customization. + # docbook/db2 syntax CUSTOM_HTML = --dsl custom.dsl\#html CUSTOM_PRINT = --dsl custom.dsl\#print + # xmlto syntax +CUSTOM_HTML_XMLTO = -m custom.xsl +CUSTOM_PRINT_XMLTO = -m custom.xsl all: capture html-single @@ -130,6 +136,12 @@ html-single: html-single-build.stamp pdf: pdf-build.stamp +man: man-build.stamp + +man_install: man-build.stamp + install -d /usr/local/man/man2 + install -b man/* /usr/local/man/man2 + coffeebreak: all html pdf FUNCS = \ @@ -245,6 +257,7 @@ ENUMS = \ v4l2_power_line_frequency \ v4l2_priority \ v4l2_tuner_type \ + v4l2_preemphasis \ STRUCTS = \ v4l2_audio \ @@ -307,6 +320,7 @@ ERRORS = \ EINVAL \ ENFILE \ ENOMEM \ + ENOSPC \ ENOTTY \ ENXIO \ EMFILE \ @@ -323,7 +337,8 @@ DOCUMENTED = \ -e "s/\(enum *\)v4l2_mpeg_cx2341x_video_\([a-z]*_spatial_filter_type\)/\1<link linkend=\"\2\">v4l2_mpeg_cx2341x_video_\2<\/link>/g" \ -e "s/\(\(enum\|struct\) *\)\(v4l2_[a-zA-Z0-9_]*\)/\1<link linkend=\"\3\">\3<\/link>/g" \ -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\) /<link linkend=\"\1\">\1<\/link> /g" \ - -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" + -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ + -e "s/(linkend=\")v4l2-mpeg-vbi-ITV0/\1)v4l2_mpeg_vbi_itv0-1/g" libv4l-fmt.sgml: cat ../v4l2-apps/libv4l/libv4lconvert/*.c| \ @@ -345,6 +360,13 @@ v4l2grab.c.sgml: ../v4l2-apps/test/v4l2grab.c Makefile sed 's/i\.e\./&ie;/' >> $@ echo "</programlisting>" >> $@ +keytable.c.sgml: ../v4l2-apps/util/keytable.c Makefile + echo "<programlisting>" > $@ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DOCUMENTED) | \ + sed 's/i\.e\./&ie;/' >> $@ + echo "</programlisting>" >> $@ + videodev2.h.sgml: ../linux/include/linux/videodev2.h Makefile echo "<programlisting>" > $@ expand --tabs=8 < $< | \ @@ -458,10 +480,14 @@ indices.sgml: Makefile # HTML version. html-build.stamp: Makefile checks $(SGMLS) $(GIFPICS) rm -rf v4l2 - if which docbook2html >/dev/null ; then \ - docbook2html $(WARN) $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \ + if which xmlto >/dev/null ; then \ + xmlto xhtml $(WARN) $(CUSTOM_HTML_XMLTO) -o v4l2 v4l2.sgml ; \ + elif which docbook2html >/dev/null ; then \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \ + docbook2html $(WARN) $$DCL $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \ else \ - db2html $(WARN) $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \ + db2html $(WARN) $$DCL $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \ fi cp $(GIFPICS) v4l2/ cd v4l2 ; \ @@ -475,11 +501,15 @@ html-build.stamp: Makefile checks $(SGMLS) $(GIFPICS) # is more convenient than clicking through dozens of pages. html-single-build.stamp: Makefile checks $(SGMLS) $(GIFPICS) rm -rf v4l2-single - if which docbook2html >/dev/null; then \ - docbook2html $(WARN) $(CUSTOM_HTML) --nochunks \ + if which xmlto >/dev/null ; then \ + xmlto html-nochunks $(WARN) $(CUSTOM_HTML_XMLTO) -o v4l2-single v4l2.sgml ; \ + elif which docbook2html >/dev/null ; then \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \ + docbook2html $$DCL $(WARN) $(CUSTOM_HTML) --nochunks \ --output v4l2-single v4l2.sgml ; \ else \ - db2html $(WARN) $(CUSTOM_HTML) --nochunks \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \ + db2html $$DCL $(WARN) $(CUSTOM_HTML) --nochunks \ --output v4l2-single v4l2.sgml ; \ fi cp $(GIFPICS) v4l2-single/ @@ -488,13 +518,22 @@ html-single-build.stamp: Makefile checks $(SGMLS) $(GIFPICS) # For printing. pdf-build.stamp: Makefile checks $(SGMLS) $(PDFPICS) - if which docbook2pdf >/dev/null; then \ - docbook2pdf $(WARN) $(CUSTOM_PRINT) v4l2.sgml ; \ + if which db2pdf >/dev/null ; then \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl|head -1`"; \ + db2pdf $$DCL $(WARN) $(CUSTOM_PRINT) v4l2.sgml ; \ + elif which xmlto >/dev/null ; then \ + xmlto pdf $(WARN) $(CUSTOM_HTML_XMLTO) -o v4l2-single v4l2.sgml ; \ else \ - db2pdf $(WARN) $(CUSTOM_PRINT) v4l2.sgml ; \ + export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \ + docbook2pdf $$DCL $(WARN) $(CUSTOM_PRINT) v4l2.sgml ; \ fi touch pdf-build.stamp + +# For man +man-build.stamp: Makefile checks $(SGMLS) $(PDFPICS) + xmlto man $(WARN) $(CUSTOM_HTML_XMLTO) -o man v4l2.sgml + # Example. capture: ../v4l2-apps/test/capture-example.c gcc $^ -o $@ |