doc: kbuild: use interpreters to invoke scripts
Subsystems (2)
RFC PATCH 1/1 doc: kbuild: use interpreters to invoke scripts
We cannot rely on execute bits to be set on files in the repository. The build script should use the explicit interpreter when invoking any script from the repository.
Suggested-by Andrew Morton <[email protected]>
Suggested-by Kees Cook <[email protected]>
Suggested-by Lukas Bulwahn <[email protected]>
Signed-off-by Ujjwal Kumar <[email protected]>
--- Documentation/Makefile | 16 ++++++++-------- Documentation/userspace-api/media/Makefile | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-)
Documentation/Makefile +8 -8
@@ -7,7 +7,7 @@ subdir- := devicetree/bindings # Check for broken documentation file references ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y) -$(shell $(srctree)/scripts/documentation-file-ref-check --warn) +$($(PERL) $(srctree)/scripts/documentation-file-ref-check --warn) endif # You can set these variables from the command line.
@@ -29,7 +29,7 @@ ifeq ($(HAVE_SPHINX),0) .DEFAULT: $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.) @echo - @$(srctree)/scripts/sphinx-pre-install + @$(PERL) $(srctree)/scripts/sphinx-pre-install @echo " SKIP Sphinx $@ target." else # HAVE_SPHINX
@@ -78,14 +78,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) $(abspath $(BUILDDIR)/$3/$4) htmldocs: - @$(srctree)/scripts/sphinx-pre-install --version-check + @$(PERL) $(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) linkcheckdocs: @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) latexdocs: - @$(srctree)/scripts/sphinx-pre-install --version-check + @$(PERL) $(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var))) ifeq ($(HAVE_PDFLATEX),0)
@@ -97,7 +97,7 @@ pdfdocs: else # HAVE_PDFLATEX pdfdocs: latexdocs - @$(srctree)/scripts/sphinx-pre-install --version-check + @$(PERL) $(srctree)/scripts/sphinx-pre-install --version-check $(foreach var,$(SPHINXDIRS), \ $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit; \ mkdir -p $(BUILDDIR)/$(var)/pdf; \
@@ -107,11 +107,11 @@ pdfdocs: latexdocs endif # HAVE_PDFLATEX epubdocs: - @$(srctree)/scripts/sphinx-pre-install --version-check + @$(PERL) $(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var))) xmldocs: - @$(srctree)/scripts/sphinx-pre-install --version-check + @$(PERL) $(srctree)/scripts/sphinx-pre-install --version-check @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var))) endif # HAVE_SPHINX
@@ -120,7 +120,7 @@ endif # HAVE_SPHINX # work or silently pass without Sphinx. refcheckdocs: - $(Q)cd $(srctree);scripts/documentation-file-ref-check + $(Q)cd $(srctree);$(PERL) scripts/documentation-file-ref-check cleandocs: $(Q)rm -rf $(BUILDDIR)
Documentation/userspace-api/media/Makefile +3 -3
@@ -13,11 +13,11 @@ FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \ TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) gen_rst = \ - echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \ - ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions + echo $(PERL) ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \ + $(PERL) ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \ - ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions + $(PERL) ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions silent_gen_rst = ${gen_rst}
Signature · 6 lines
2.26.2 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees