scripts: sphinx-build-wrapper: get rid of uapi/media Makefile

Now that kernel-include directive supports parsing data
structs directly, we can finally get rid of the horrible hack
we added to support parsing media uAPI symbols.

As a side effect, Documentation/output doesn't have anymore
media auto-generated .rst files on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/5dbb257a4b283697271c9c7b8f4713857e8191c8.1755872208.git.mchehab+huawei@kernel.org
This commit is contained in:
Mauro Carvalho Chehab
2025-08-22 16:19:35 +02:00
committed by Jonathan Corbet
parent a49adfab49
commit 8a298579cd
16 changed files with 745 additions and 76 deletions

View File

@@ -1,64 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Rules to convert a .h file to inline RST documentation
SRC_DIR=$(srctree)/Documentation/userspace-api/media
PARSER = $(srctree)/tools/docs/parse-headers.py
UAPI = $(srctree)/include/uapi/linux
KAPI = $(srctree)/include/linux
FILES = ca.h.rst dmx.h.rst frontend.h.rst net.h.rst \
videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
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)/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)/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: ${UAPI}/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)
# Media build rules
.PHONY: all html texinfo epub xml latex
all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
html: all
texinfo: all
epub: all
xml: all
latex: $(IMGPDF) all
linkcheck:
clean:
-rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
$(BUILDDIR):
$(Q)mkdir -p $@

View File

@@ -6,5 +6,6 @@
CEC Header File
***************
.. kernel-include:: $BUILDDIR/cec.h.rst
.. kernel-include:: include/uapi/linux/cec.h
:generate-cross-refs:
:exception-file: cec.h.rst.exceptions

View File

@@ -7,10 +7,19 @@ Digital TV uAPI header files
Digital TV uAPI headers
***********************
.. kernel-include:: $BUILDDIR/frontend.h.rst
.. kernel-include:: include/uapi/linux/dvb/frontend.h
:generate-cross-refs:
:exception-file: frontend.h.rst.exceptions
.. kernel-include:: $BUILDDIR/dmx.h.rst
.. kernel-include:: include/uapi/linux/dvb/dmx.h
:generate-cross-refs:
:exception-file: dmx.h.rst.exceptions
.. kernel-include:: $BUILDDIR/ca.h.rst
.. kernel-include:: include/uapi/linux/dvb/ca.h
:generate-cross-refs:
:exception-file: ca.h.rst.exceptions
.. kernel-include:: include/uapi/linux/dvb/net.h
:generate-cross-refs:
:exception-file: net.h.rst.exceptions
.. kernel-include:: $BUILDDIR/net.h.rst

View File

@@ -6,5 +6,6 @@
Media Controller Header File
****************************
.. kernel-include:: $BUILDDIR/media.h.rst
.. kernel-include:: include/uapi/linux/media.h
:generate-cross-refs:
:exception-file: media.h.rst.exceptions

View File

@@ -6,5 +6,7 @@
LIRC Header File
****************
.. kernel-include:: $BUILDDIR/lirc.h.rst
.. kernel-include:: include/uapi/linux/lirc.h
:generate-cross-refs:
:exception-file: lirc.h.rst.exceptions

View File

@@ -6,4 +6,6 @@
Video For Linux Two Header File
*******************************
.. kernel-include:: $BUILDDIR/videodev2.h.rst
.. kernel-include:: include/uapi/linux/videodev2.h
:generate-cross-refs:
:exception-file: videodev2.h.rst.exceptions