linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>,
	Michal Marek <michal.lkml@markovi.net>
Subject: [PATCH 4/8] kbuild: turn '/' into an alias of './'
Date: Thu, 14 Feb 2019 12:05:17 +0900	[thread overview]
Message-ID: <1550113521-23577-4-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1550113521-23577-1-git-send-email-yamada.masahiro@socionext.com>

Commit 06300b21f4c7 ("kbuild: support building individual files for
external modules") introduced the '/' target. It works only for
external modules to build all .o files, but skip the modpost stage.

However, 'make /' looks a bit weird to me. 'make ./' is more sensible
if you want to build all objects under the current directory, and it
works as expected.

Let's change '/' into a phony target that is an alias of './', but
I may feel like deprecating it in the future.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Documentation/kbuild/modules.txt | 2 +-
 Makefile                         | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 3fb39e0..80295c6 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -140,7 +140,7 @@ executed to make module versioning work.
 		make -C $KDIR M=$PWD bar.lst
 		make -C $KDIR M=$PWD baz.o
 		make -C $KDIR M=$PWD foo.ko
-		make -C $KDIR M=$PWD /
+		make -C $KDIR M=$PWD ./
 
 
 === 3. Creating a Kbuild File for an External Module
diff --git a/Makefile b/Makefile
index fe62de3..3956e93 100644
--- a/Makefile
+++ b/Makefile
@@ -1709,8 +1709,9 @@ endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 
 # Modules
-/: prepare FORCE
-	$(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir)
+PHONY += /
+/: ./
+
 # Make sure the latest headers are built for Documentation
 Documentation/ samples/: headers_install
 %/: prepare FORCE
-- 
2.7.4


  parent reply	other threads:[~2019-02-14  3:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  3:05 [PATCH 1/8] kbuild: pkg: use -f $(srctree)/Makefile to recurse to top Makefile Masahiro Yamada
2019-02-14  3:05 ` [PATCH 2/8] kbuild: generate modules.order only when CONFIG_MODULES=y Masahiro Yamada
2019-02-14  3:05 ` [PATCH 3/8] kbuild: set KBUILD_MODULES=1 all the time for single target %/ Masahiro Yamada
2019-02-14  3:05 ` Masahiro Yamada [this message]
2019-02-14  3:05 ` [PATCH 5/8] kbuild: move tools_silent to a more relevant place Masahiro Yamada
2019-02-14  3:05 ` [PATCH 6/8] kbuild: make -r/-R effective in top Makefile for old Make versions Masahiro Yamada
2019-02-14  3:05 ` [PATCH 7/8] kbuild: remove empty rules for makefiles Masahiro Yamada
2019-02-14  3:05 ` [PATCH 8/8] kbuild: simplify single targets Masahiro Yamada
2019-02-20  3:43 ` [PATCH 1/8] kbuild: pkg: use -f $(srctree)/Makefile to recurse to top Makefile Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1550113521-23577-4-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).