@@ -52,7 +52,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
# e.g. "media" for the linux-tv book-set at ./Documentation/media
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
- cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
+ cmd_sphinx = \
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \
-b $2 \
deleted file mode 100644
@@ -1,61 +0,0 @@
-# Generate the *.h.rst files from uAPI headers
-
-PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
-UAPI = $(srctree)/include/uapi/linux
-KAPI = $(srctree)/include/linux
-SRC_DIR=$(srctree)/Documentation/media
-
-FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
- videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
-
-TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
-
-.PHONY: all
-all: $(BUILDDIR) ${TARGETS}
-
-$(BUILDDIR):
- $(Q)mkdir -p $@
-
-# Rule to convert a .h file to inline RST documentation
-
-gen_rst = \
- echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
- ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
-
-quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
- ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
-
-silent_gen_rst = ${gen_rst}
-
-$(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/dmx.h.rst: ${UAPI}/dvb/dmx.h ${PARSER} $(SRC_DIR)/dmx.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
- @$($(quiet)gen_rst)
-
-cleandocs:
- -rm ${TARGETS}
@@ -6,5 +6,4 @@
CEC Header File
***************
-.. kernel-include:: $BUILDDIR/cec.h.rst
-
+.. kernel-cmd:: parse-headers.pl $srctree/include/linux/cec.h cec.h.exceptions
similarity index 100%
rename from Documentation/media/cec.h.rst.exceptions
rename to Documentation/media/uapi/cec/cec.h.exceptions
similarity index 100%
rename from Documentation/media/audio.h.rst.exceptions
rename to Documentation/media/uapi/dvb/audio.h.exceptions
@@ -6,4 +6,4 @@
DVB Audio Header File
*********************
-.. kernel-include:: $BUILDDIR/audio.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/audio.h audio.h.exceptions
similarity index 100%
rename from Documentation/media/ca.h.rst.exceptions
rename to Documentation/media/uapi/dvb/ca.h.exceptions
@@ -6,4 +6,4 @@
DVB Conditional Access Header File
**********************************
-.. kernel-include:: $BUILDDIR/ca.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/ca.h ca.h.exceptions
similarity index 100%
rename from Documentation/media/dmx.h.rst.exceptions
rename to Documentation/media/uapi/dvb/dmx.h.exceptions
@@ -6,4 +6,4 @@
DVB Demux Header File
*********************
-.. kernel-include:: $BUILDDIR/dmx.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/dmx.h dmx.h.exceptions
similarity index 100%
rename from Documentation/media/frontend.h.rst.exceptions
rename to Documentation/media/uapi/dvb/frontend.h.exceptions
@@ -6,4 +6,4 @@
DVB Frontend Header File
************************
-.. kernel-include:: $BUILDDIR/frontend.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/frontend.h frontend.h.exceptions
similarity index 100%
rename from Documentation/media/net.h.rst.exceptions
rename to Documentation/media/uapi/dvb/net.h.exceptions
@@ -6,4 +6,4 @@
DVB Network Header File
***********************
-.. kernel-include:: $BUILDDIR/net.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/net.h net.h.exceptions
similarity index 100%
rename from Documentation/media/video.h.rst.exceptions
rename to Documentation/media/uapi/dvb/video.h.exceptions
@@ -6,4 +6,4 @@
DVB Video Header File
*********************
-.. kernel-include:: $BUILDDIR/video.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/dvb/video.h video.h.exceptions
@@ -6,5 +6,4 @@
Media Controller Header File
****************************
-.. kernel-include:: $BUILDDIR/media.h.rst
-
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/media.h media.h.exceptions
similarity index 100%
rename from Documentation/media/media.h.rst.exceptions
rename to Documentation/media/uapi/mediactl/media.h.exceptions
@@ -6,5 +6,5 @@
LIRC Header File
****************
-.. kernel-include:: $BUILDDIR/lirc.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/lirc.h lirc.h.exceptions
similarity index 100%
rename from Documentation/media/lirc.h.rst.exceptions
rename to Documentation/media/uapi/rc/lirc.h.exceptions
@@ -6,4 +6,4 @@
Video For Linux Two Header File
*******************************
-.. kernel-include:: $BUILDDIR/videodev2.h.rst
+.. kernel-cmd:: parse-headers.pl $srctree/include/uapi/linux/videodev2.h videodev2.h.exceptions
similarity index 100%
rename from Documentation/media/videodev2.h.rst.exceptions
rename to Documentation/media/uapi/v4l/videodev2.h.exceptions
@@ -9,10 +9,10 @@ use Text::Tabs;
my $debug = 0;
if (scalar @ARGV < 2 || scalar @ARGV > 3) {
- die "Usage:\n\t$0 <file in> <file out> [<exceptions file>]\n";
+ die "Usage:\n\t$0 <file in> [<exceptions file>]\n";
}
-my ($file_in, $file_out, $file_exceptions) = @ARGV;
+my ($file_in, $file_exceptions) = @ARGV;
my $data;
my %ioctls;
@@ -306,16 +306,13 @@ foreach my $r (keys %typedefs) {
$data =~ s/\\ \n/\n/g;
#
-# Generate output file
+# print generated content to stdout
#
my $title = $file_in;
$title =~ s,.*/,,;
-open OUT, "> $file_out" or die "Can't open $file_out";
-print OUT ".. -*- coding: utf-8; mode: rst -*-\n\n";
-print OUT "$title\n";
-print OUT "=" x length($title);
-print OUT "\n\n.. parsed-literal::\n\n";
-print OUT $data;
-close OUT;
+print "$title\n";
+print "=" x length($title);
+print "\n\n.. parsed-literal::\n\n";
+print $data;