]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
kbuild: turn '/' into an alias of './'
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 14 Feb 2019 03:05:17 +0000 (12:05 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 20 Feb 2019 00:42:47 +0000 (09:42 +0900)
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
Makefile

index 3fb39e0116b4c8e42d40009357ed5cf13c1f2888..80295c613e372ed17e15595339ac98fa6c9fdd62 100644 (file)
@@ -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
index cacb7515a10b9cca28a98e738656c5215fabb276..8d502752944bcf01590acd8508b59c552b829a0b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1715,8 +1715,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