Skip to content

Commit 23b5306

Browse files
committed
kbuild: doc: fix 'List directories to visit when descending' section
Fix stale information: - Fix the section number in the reference from 6.4 to 7.4. - Remove init-y and net-y. They were removed by commit 23febe3 ("kbuild: merge init-y into core-y") and commit 95fb631 ("kbuild: merge net-y and virt-y into drivers-y"), respectively. - Update the example because arch/sparc64/Makefile does not exit. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 8c4d9b1 commit 23b5306

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Documentation/kbuild/makefiles.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ more details, with real examples.
278278
actually recognize that there is a lib.a being built, the directory
279279
shall be listed in libs-y.
280280

281-
See also "6.4 List directories to visit when descending".
281+
See also "7.4 List directories to visit when descending".
282282

283283
Use of lib-y is normally restricted to `lib/` and `arch/*/lib`.
284284

@@ -1154,31 +1154,32 @@ When kbuild executes, the following steps are followed (roughly):
11541154
machinery is all architecture-independent.
11551155

11561156

1157-
head-y, init-y, core-y, libs-y, drivers-y, net-y
1157+
head-y, core-y, libs-y, drivers-y
11581158
$(head-y) lists objects to be linked first in vmlinux.
11591159

11601160
$(libs-y) lists directories where a lib.a archive can be located.
11611161

11621162
The rest list directories where a built-in.a object file can be
11631163
located.
11641164

1165-
$(init-y) objects will be located after $(head-y).
1166-
11671165
Then the rest follows in this order:
11681166

1169-
$(core-y), $(libs-y), $(drivers-y) and $(net-y).
1167+
$(core-y), $(libs-y), $(drivers-y)
11701168

11711169
The top level Makefile defines values for all generic directories,
11721170
and arch/$(SRCARCH)/Makefile only adds architecture-specific
11731171
directories.
11741172

11751173
Example::
11761174

1177-
#arch/sparc64/Makefile
1178-
core-y += arch/sparc64/kernel/
1179-
libs-y += arch/sparc64/prom/ arch/sparc64/lib/
1180-
drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
1175+
# arch/sparc/Makefile
1176+
core-y += arch/sparc/
1177+
1178+
libs-y += arch/sparc/prom/
1179+
libs-y += arch/sparc/lib/
11811180

1181+
drivers-$(CONFIG_PM) += arch/sparc/power/
1182+
drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/
11821183

11831184
7.5 Architecture-specific boot images
11841185
-------------------------------------

0 commit comments

Comments
 (0)