Skip to content

Commit

Permalink
kbuild: turn '/' into an alias of './'
Browse files Browse the repository at this point in the history
Commit 06300b2 ("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 <[email protected]>
  • Loading branch information
masahir0y committed Feb 20, 2019
1 parent 648ad9b commit 6d3c94e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/kbuild/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d3c94e

Please sign in to comment.