summaryrefslogtreecommitdiff
path: root/v4l2-spec/Makefile
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-16 11:02:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-16 11:02:15 -0300
commit4484d72262532de4b0332a7ac331035e8f07297d (patch)
treeaa97cf13c9674fab7f63a05979c3c8c0e55f3968 /v4l2-spec/Makefile
parenta9bf24d26fd28acaed839977e1d050c468d5a55e (diff)
downloadmediapointer-dvb-s2-4484d72262532de4b0332a7ac331035e8f07297d.tar.gz
mediapointer-dvb-s2-4484d72262532de4b0332a7ac331035e8f07297d.tar.bz2
v4l2-spec: Remove duplicated xml files
From: Mauro Carvalho Chehab <mchehab@redhat.com> Instead of having its own version, use the one at kernel docs. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l2-spec/Makefile')
-rw-r--r--v4l2-spec/Makefile258
1 files changed, 133 insertions, 125 deletions
diff --git a/v4l2-spec/Makefile b/v4l2-spec/Makefile
index f593faccd..9d37acf0a 100644
--- a/v4l2-spec/Makefile
+++ b/v4l2-spec/Makefile
@@ -1,104 +1,102 @@
-# Also update in v4l2.sgml!
-VERSION = 0.26
SHELL=/bin/bash
SGMLS = \
- biblio.sgml \
- capture.c.sgml \
- keytable.c.sgml \
- v4l2grab.c.sgml \
- common.sgml \
- compat.sgml \
- controls.sgml \
- dev-capture.sgml \
- dev-codec.sgml \
- dev-effect.sgml \
- dev-osd.sgml \
- dev-output.sgml \
- dev-overlay.sgml \
- dev-radio.sgml \
- dev-raw-vbi.sgml \
- dev-rds.sgml \
- dev-sliced-vbi.sgml \
- dev-teletext.sgml \
- driver.sgml \
- libv4l.sgml \
- remote_controllers.sgml \
- entities.sgml \
- fdl-appendix.sgml \
- func-close.sgml \
- func-ioctl.sgml \
- func-mmap.sgml \
- func-munmap.sgml \
- func-open.sgml \
- func-poll.sgml \
- func-read.sgml \
- func-select.sgml \
- func-write.sgml \
- indices.sgml \
- io.sgml \
- pixfmt-grey.sgml \
- pixfmt-nv12.sgml \
- pixfmt-nv16.sgml \
- pixfmt-packed-rgb.sgml \
- pixfmt-packed-yuv.sgml \
- pixfmt-sbggr16.sgml \
- pixfmt-sbggr8.sgml \
- pixfmt-sgbrg8.sgml \
- pixfmt-sgrbg8.sgml \
- pixfmt-uyvy.sgml \
- pixfmt-vyuy.sgml \
- pixfmt-y16.sgml \
- pixfmt-y41p.sgml \
- pixfmt-yuv410.sgml \
- pixfmt-yuv411p.sgml \
- pixfmt-yuv420.sgml \
- pixfmt-yuv422p.sgml \
- pixfmt-yuyv.sgml \
- pixfmt-yvyu.sgml \
- pixfmt.sgml \
- v4l2.sgml \
- videodev2.h.sgml \
- vidioc-cropcap.sgml \
- vidioc-dbg-g-register.sgml \
- vidioc-encoder-cmd.sgml \
- vidioc-enum-fmt.sgml \
- vidioc-enum-frameintervals.sgml \
- vidioc-enum-framesizes.sgml \
- vidioc-enumaudio.sgml \
- vidioc-enumaudioout.sgml \
- vidioc-enuminput.sgml \
- vidioc-enumoutput.sgml \
- vidioc-enumstd.sgml \
- vidioc-g-audio.sgml \
- vidioc-g-audioout.sgml \
- vidioc-dbg-g-chip-ident.sgml \
- vidioc-g-crop.sgml \
- vidioc-g-ctrl.sgml \
- vidioc-g-enc-index.sgml \
- vidioc-g-ext-ctrls.sgml \
- vidioc-g-fbuf.sgml \
- vidioc-g-fmt.sgml \
- vidioc-g-frequency.sgml \
- vidioc-g-input.sgml \
- vidioc-g-jpegcomp.sgml \
- vidioc-g-modulator.sgml \
- vidioc-g-output.sgml \
- vidioc-g-parm.sgml \
- vidioc-g-priority.sgml \
- vidioc-g-sliced-vbi-cap.sgml \
- vidioc-g-std.sgml \
- vidioc-g-tuner.sgml \
- vidioc-log-status.sgml \
- vidioc-overlay.sgml \
- vidioc-qbuf.sgml \
- vidioc-querybuf.sgml \
- vidioc-querycap.sgml \
- vidioc-queryctrl.sgml \
- vidioc-querystd.sgml \
- vidioc-reqbufs.sgml \
- vidioc-s-hw-freq-seek.sgml \
- vidioc-streamon.sgml \
+ biblio.xml \
+ capture.c.xml \
+ keytable.c.xml \
+ v4l2grab.c.xml \
+ common.xml \
+ compat.xml \
+ controls.xml \
+ dev-capture.xml \
+ dev-codec.xml \
+ dev-effect.xml \
+ dev-osd.xml \
+ dev-output.xml \
+ dev-overlay.xml \
+ dev-radio.xml \
+ dev-raw-vbi.xml \
+ dev-rds.xml \
+ dev-sliced-vbi.xml \
+ dev-teletext.xml \
+ driver.xml \
+ libv4l.xml \
+ remote_controllers.xml \
+ entities.xml \
+ fdl-appendix.xml \
+ func-close.xml \
+ func-ioctl.xml \
+ func-mmap.xml \
+ func-munmap.xml \
+ func-open.xml \
+ func-poll.xml \
+ func-read.xml \
+ func-select.xml \
+ func-write.xml \
+ indices.xml \
+ io.xml \
+ pixfmt-grey.xml \
+ pixfmt-nv12.xml \
+ pixfmt-nv16.xml \
+ pixfmt-packed-rgb.xml \
+ pixfmt-packed-yuv.xml \
+ pixfmt-sbggr16.xml \
+ pixfmt-sbggr8.xml \
+ pixfmt-sgbrg8.xml \
+ pixfmt-sgrbg8.xml \
+ pixfmt-uyvy.xml \
+ pixfmt-vyuy.xml \
+ pixfmt-y16.xml \
+ pixfmt-y41p.xml \
+ pixfmt-yuv410.xml \
+ pixfmt-yuv411p.xml \
+ pixfmt-yuv420.xml \
+ pixfmt-yuv422p.xml \
+ pixfmt-yuyv.xml \
+ pixfmt-yvyu.xml \
+ pixfmt.xml \
+ videodev2.h.xml \
+ vidioc-cropcap.xml \
+ vidioc-dbg-g-register.xml \
+ vidioc-encoder-cmd.xml \
+ vidioc-enum-fmt.xml \
+ vidioc-enum-frameintervals.xml \
+ vidioc-enum-framesizes.xml \
+ vidioc-enumaudio.xml \
+ vidioc-enumaudioout.xml \
+ vidioc-enuminput.xml \
+ vidioc-enumoutput.xml \
+ vidioc-enumstd.xml \
+ vidioc-g-audio.xml \
+ vidioc-g-audioout.xml \
+ vidioc-dbg-g-chip-ident.xml \
+ vidioc-g-crop.xml \
+ vidioc-g-ctrl.xml \
+ vidioc-g-enc-index.xml \
+ vidioc-g-ext-ctrls.xml \
+ vidioc-g-fbuf.xml \
+ vidioc-g-fmt.xml \
+ vidioc-g-frequency.xml \
+ vidioc-g-input.xml \
+ vidioc-g-jpegcomp.xml \
+ vidioc-g-modulator.xml \
+ vidioc-g-output.xml \
+ vidioc-g-parm.xml \
+ vidioc-g-priority.xml \
+ vidioc-g-sliced-vbi-cap.xml \
+ vidioc-g-std.xml \
+ vidioc-g-tuner.xml \
+ vidioc-log-status.xml \
+ vidioc-overlay.xml \
+ vidioc-qbuf.xml \
+ vidioc-querybuf.xml \
+ vidioc-querycap.xml \
+ vidioc-queryctrl.xml \
+ vidioc-querystd.xml \
+ vidioc-reqbufs.xml \
+ vidioc-s-hw-freq-seek.xml \
+ vidioc-streamon.xml \
+ v4l2.sgml
PDFPICS = \
crop.pdf \
@@ -332,7 +330,7 @@ ESCAPE = \
-e "s/</\\&lt;/g" \
-e "s/>/\\&gt;/g"
-# Generate references to these structs in videodev2.h.sgml.
+# Generate references to these structs in videodev2.h.xml.
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" \
@@ -340,48 +338,57 @@ DOCUMENTED = \
-e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \
-e "s/(linkend=\")v4l2-mpeg-vbi-ITV0/\1)v4l2_mpeg_vbi_itv0-1/g"
-libv4l-fmt.sgml:
+.PHONY: links
+
+$(SGMLS): links
+$(PDFPICS): links
+$(GIFPICS): links
+
+links::
+ ln -sf ../linux/Documentation/DocBook/v4l/* .
+
+libv4l-fmt.xml: ../v4l2-apps/libv4l/libv4lconvert/*.c Makefile
cat ../v4l2-apps/libv4l/libv4lconvert/*.c| \
perl -ne 'if (m/(V4L2_PIX_FMT_[^\s\;\\)\,:]+)/) { printf "<link linkend=\"$$1\"><constant>$$1</constant></link>,\n"; };' \
|sort|uniq| \
sed -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" > $@
-capture.c.sgml: ../v4l2-apps/test/capture-example.c Makefile
+capture.c.xml: ../v4l2-apps/test/capture-example.c Makefile
echo "<programlisting>" > $@
expand --tabs=8 < $< | \
sed $(ESCAPE) $(DOCUMENTED) | \
sed 's/i\.e\./&ie;/' >> $@
echo "</programlisting>" >> $@
-v4l2grab.c.sgml: ../v4l2-apps/test/v4l2grab.c Makefile
+v4l2grab.c.xml: ../v4l2-apps/test/v4l2grab.c Makefile
echo "<programlisting>" > $@
expand --tabs=8 < $< | \
sed $(ESCAPE) $(DOCUMENTED) | \
sed 's/i\.e\./&ie;/' >> $@
echo "</programlisting>" >> $@
-keytable.c.sgml: ../v4l2-apps/util/keytable.c Makefile
+keytable.c.xml: ../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
+videodev2.h.xml: ../linux/include/linux/videodev2.h Makefile
echo "<programlisting>" > $@
expand --tabs=8 < $< | \
sed $(ESCAPE) $(DOCUMENTED) | \
sed 's/i\.e\./&ie;/' >> $@
echo "</programlisting>" >> $@
-checks:
+checks: $(SGMLS)
# Warn about <constant>FOO-BAR</constant> which should be
# &FOO-BAR; or <constant>FOO_BAR</constant>.
- (! grep '>[A-Z]+-[A-Z-]+<' *.sgml)
+ (! grep '>[A-Z]+-[A-Z-]+<' *.xml)
# Don't end a refpurpose blob with a period.
- (! grep '\.</refpurpose>' *.sgml)
+ (! grep '\.</refpurpose>' *.xml)
# Catch typos in error code names.
- errs=`grep '<errorcode>[^<]\+</errorcode>' *.sgml | \
+ errs=`grep '<errorcode>[^<]\+</errorcode>' *.xml | \
sed 's/.*<errorcode>//;s/<\/errorcode>.*//' | sort -u` ; \
for err in $$errs; do \
if ! echo $(ERRORS) | grep -q $$err ; then \
@@ -390,7 +397,7 @@ checks:
done
# Use the respective entities instead.
for abbrev in "e\\.g\\." "i\\.e\\." "i2c" ; do \
- grep "[^a-z&]$$abbrev[^a-z.;-]" *.sgml | \
+ grep "[^a-z&]$$abbrev[^a-z.;-]" *.xml | \
grep -v -E "(ENTITY|videodev2\.h)" && exit 1 ; \
done ; \
exit 0
@@ -398,7 +405,7 @@ checks:
# We're generating these entities to avoid typos, to enforce consistent
# naming, an to be warned about missing items (Jade screams bloody murder
# if references are dangling).
-entities.sgml: Makefile
+entities.xml: Makefile $(SGMLS)
echo "<!-- Generated file! Do not edit. -->" >$@
echo -e "\n<!-- Functions -->" >>$@
for ident in $(FUNCS) ; do \
@@ -410,7 +417,7 @@ entities.sgml: Makefile
echo -e "\n<!-- Ioctls -->" >>$@
for ident in $(IOCTLS) ; do \
entity=`echo $$ident | tr _ -` ; \
- id=`grep "<refname>$$ident" vidioc-*.sgml | sed 's/\.sgml.*//'` ; \
+ id=`grep "<refname>$$ident" vidioc-*.xml | sed 's/\.xml.*//'` ; \
echo "<!ENTITY $$entity \"<link" \
"linkend='$$id'><constant>$$ident</constant></link>\">" \
>>$@ ; \
@@ -440,7 +447,7 @@ entities.sgml: Makefile
done
echo -e "\n<!-- Subsections -->" >>$@
for file in $(SGMLS) ; do \
- entity=`echo "$$file" | sed 's/.sgml//;s/\./-/g'` ; \
+ entity=`echo "$$file" | sed 's/.xml//;s/\./-/g'` ; \
if ! echo "$$file" | \
grep -q -E -e '^(func|vidioc|pixfmt)-' ; then \
echo "<!ENTITY sub-$$entity SYSTEM \"$$file\">" >>$@ ; \
@@ -450,14 +457,14 @@ entities.sgml: Makefile
for file in $(SGMLS) ; do \
if echo "$$file" | \
grep -q -E -e '^(func|vidioc|pixfmt)-' ; then \
- entity=`echo "$$file" | sed 's/^[^-]*/sub/;s/.sgml//'` ; \
+ entity=`echo "$$file" | sed 's/^[^-]*/sub/;s/.xml//'` ; \
echo "<!ENTITY $$entity SYSTEM \"$$file\">" >>$@ ; \
fi ; \
done
# Jade can auto-generate a list-of-tables, which includes all structs,
# but we only want data types, all types, and sorted please.
-indices.sgml: Makefile
+indices.xml: Makefile $(SGMLS)
echo "<!-- Generated file! Do not edit. -->" >$@
echo -e "\n<index><title>List of Types</title>" >>$@
for ident in $(TYPES) ; do \
@@ -483,10 +490,10 @@ html-build.stamp: Makefile checks $(SGMLS) $(GIFPICS)
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`"; \
+ export DCL="--dcl `find /usr/share.xml -name xml.dcl |head -1`"; \
docbook2html $(WARN) $$DCL $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \
else \
- export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \
+ export DCL="--dcl `find /usr/share.xml -name xml.dcl |head -1`"; \
db2html $(WARN) $$DCL $(CUSTOM_HTML) --output v4l2 v4l2.sgml ; \
fi
cp $(GIFPICS) v4l2/
@@ -504,11 +511,11 @@ html-single-build.stamp: Makefile checks $(SGMLS) $(GIFPICS)
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`"; \
+ export DCL="--dcl `find /usr/share.xml -name xml.dcl |head -1`"; \
docbook2html $$DCL $(WARN) $(CUSTOM_HTML) --nochunks \
--output v4l2-single v4l2.sgml ; \
else \
- export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \
+ export DCL="--dcl `find /usr/share.xml -name xml.dcl |head -1`"; \
db2html $$DCL $(WARN) $(CUSTOM_HTML) --nochunks \
--output v4l2-single v4l2.sgml ; \
fi
@@ -519,12 +526,12 @@ html-single-build.stamp: Makefile checks $(SGMLS) $(GIFPICS)
# For printing.
pdf-build.stamp: Makefile checks $(SGMLS) $(PDFPICS)
if which db2pdf >/dev/null ; then \
- export DCL="--dcl `find /usr/share/sgml -name xml.dcl|head -1`"; \
+ export DCL="--dcl `find /usr/share.xml -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 \
- export DCL="--dcl `find /usr/share/sgml -name xml.dcl |head -1`"; \
+ export DCL="--dcl `find /usr/share.xml -name xml.dcl |head -1`"; \
docbook2pdf $$DCL $(WARN) $(CUSTOM_PRINT) v4l2.sgml ; \
fi
touch pdf-build.stamp
@@ -540,9 +547,10 @@ capture: ../v4l2-apps/test/capture-example.c
distclean clean:
rm -f *.stamp
- rm -f videodev2.h.sgml
- rm -f capture.c.sgml
- rm -f v4l2grab.c.sgml
+ rm -f videodev2.h.xml
+ rm -f capture.c.xml
+ rm -f v4l2grab.c.xml
rm -f capture
- rm -f indices.sgml entities.sgml
- rm -rf v4l2 v4l2-single v4l2.pdf
+ rm -f indices.xml entities.xml
+ rm -rf v4l2 v4l2-single v4l2.pdf man
+ find . -type l -exec rm '{}' \;