Skip to content
Snippets Groups Projects
  1. Jul 12, 2019
  2. Jun 26, 2019
    • Mike Rapoport's avatar
      scripts/sphinx-pre-install: fix out-of-tree build · 8c69b77a
      Mike Rapoport authored
      
      Build of htmldocs fails for out-of-tree builds:
      
      $ make V=1 O=~/build/kernel/ htmldocs
      make -C /home/rppt/build/kernel -f /home/rppt/git/linux-docs/Makefile htmldocs
      make[1]: Entering directory '/home/rppt/build/kernel'
      make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=scripts/basic
      rm -f .tmp_quiet_recordmcount
      make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=Documentation htmldocs
      Can't open Documentation/conf.py at /home/rppt/git/linux-docs/scripts/sphinx-pre-install line 230.
      /home/rppt/git/linux-docs/Documentation/Makefile:80: recipe for target 'htmldocs' failed
      make[2]: *** [htmldocs] Error 2
      
      The scripts/sphinx-pre-install is trying to open files in the current
      directory which is $KBUILD_OUTPUT rather than in $srctree.
      
      Fix it.
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      8c69b77a
    • Jonathan Corbet's avatar
      kernel-doc: Don't try to mark up function names · 344fdb28
      Jonathan Corbet authored
      
      We now have better automarkup in sphinx itself and, besides, this markup
      was incorrect and left :c:func: gunk in the processed docs.  Sort of
      discouraging that nobody ever noticed...:)
      
      As a first step toward the removal of impenetrable regex magic from
      kernel-doc it's a tiny one, but you have to start somewhere.
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      344fdb28
  3. Jun 25, 2019
  4. Jun 19, 2019
  5. Jun 14, 2019
  6. Jun 07, 2019
    • Bjorn Helgaas's avatar
      scripts/sphinx-pre-install: fix "dependenties" typo · 54002b56
      Bjorn Helgaas authored
      
      Fix typo ("dependenties" for "dependencies").
      
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      54002b56
    • Mauro Carvalho Chehab's avatar
      docs: Kbuild/Makefile: allow check for missing docs at build time · b1663d7e
      Mauro Carvalho Chehab authored
      
      While this doesn't make sense for production Kernels, in order to
      avoid regressions when documents are touched, let's add a
      check target at the make file.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      b1663d7e
    • Masahiro Yamada's avatar
      kbuild: use more portable 'command -v' for cc-cross-prefix · 913ab978
      Masahiro Yamada authored
      To print the pathname that will be used by shell in the current
      environment, 'command -v' is a standardized way. [1]
      
      'which' is also often used in scripts, but it is less portable.
      
      When I worked on commit bd55f96f ("kbuild: refactor cc-cross-prefix
      implementation"), I was eager to use 'command -v' but it did not work.
      (The reason is explained below.)
      
      I kept 'which' as before but got rid of '> /dev/null 2>&1' as I
      thought it was no longer needed. Sorry, I was wrong.
      
      It works well on my Ubuntu machine, but Alexey Brodkin reports noisy
      warnings on CentOS7 when 'which' fails to find the given command in
      the PATH environment.
      
        $ which foo
        which: no foo in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
      
      Given that behavior of 'which' depends on system (and it may not be
      installed by default), I want to try 'command -v' once again.
      
      The specification [1] clearly describes the behavior of 'command -v'
      when the given command is not found:
      
        Otherwise, no output shall be written and the exit status shall reflect
        that the name was not found.
      
      However, we need a little magic to use 'command -v' from Make.
      
      $(shell ...) passes the argument to a subshell for execution, and
      returns the standard output of the command.
      
      Here is a trick. GNU Make may optimize this by executing the command
      directly instead of forking a subshell, if no shell special characters
      are found in the command and omitting the subshell will not change the
      behavior.
      
      In this case, no shell special character is used. So, Make will try
      to run it directly. However, 'command' is a shell-builtin command,
      then Make would fail to find it in the PATH environment:
      
        $ make ARCH=m68k defconfig
        make: command: Command not found
        make: command: Command not found
        make: command: Command not found
      
      In fact, Make has a table of shell-builtin commands because it must
      ask the shell to execute them.
      
      Until recently, 'command' was missing in the table.
      
      This issue was fixed by the following commit:
      
      | commit 1af314465e5dfe3e8baa839a32a72e83c04f26ef
      | Author: Paul Smith <psmith@gnu.org>
      | Date:   Sun Nov 12 18:10:28 2017 -0500
      |
      |     * job.c: Add "command" as a known shell built-in.
      |
      |     This is not a POSIX shell built-in but it's common in UNIX shells.
      |     Reported by Nick Bowler <nbowler@draconx.ca>.
      
      Because the latest release is GNU Make 4.2.1 in 2016, this commit is
      not included in any released versions. (But some distributions may
      have back-ported it.)
      
      We need to trick Make to spawn a subshell. There are various ways to
      do so:
      
       1) Use a shell special character '~' as dummy
      
          $(shell : ~; command -v $(c)gcc)
      
       2) Use a variable reference that always expands to the empty string
          (suggested by David Laight)
      
          $(shell command$${x:+} -v $(c)gcc)
      
       3) Use redirect
      
          $(shell command -v $(c)gcc 2>/dev/null)
      
      I chose 3) to not confuse people. The stderr would not be polluted
      anyway, but it will provide extra safety, and is easy to understand.
      
      Tested on Make 3.81, 3.82, 4.0, 4.1, 4.2, 4.2.1
      
      [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
      
      
      
      Fixes: bd55f96f ("kbuild: refactor cc-cross-prefix implementation")
      Cc: linux-stable <stable@vger.kernel.org> # 5.1
      Reported-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      913ab978
  7. Jun 05, 2019
  8. Jun 04, 2019
  9. Jun 01, 2019
  10. May 30, 2019
Loading