Skip to content

Commit

Permalink
Documentation: use subdir-y to avoid unnecessary built-in.o files
Browse files Browse the repository at this point in the history
Change the Documentation makefiles from obj-m to subdir-y
to avoid generating unnecessary built-in.o files since nothing
in Documentation/ is ever linked in to vmlinux.

Signed-off-by: Peter Foley <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
pefoley2 authored and Jiri Kosina committed Sep 26, 2014
1 parent f4cb707 commit df68a01
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 43 deletions.
6 changes: 3 additions & 3 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \
pcmcia/ spi/ timers/ watchdog/src/ misc-devices/mei/
subdir-y := DocBook accounting auxdisplay connector \
filesystems filesystems ia64 laptops networking \
pcmcia spi timers watchdog misc-devices
3 changes: 0 additions & 3 deletions Documentation/accounting/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := getdelays

Expand Down
3 changes: 0 additions & 3 deletions Documentation/auxdisplay/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := cfag12864b-example

Expand Down
3 changes: 0 additions & 3 deletions Documentation/filesystems/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := dnotify_test

Expand Down
3 changes: 0 additions & 3 deletions Documentation/ia64/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := aliasing-test

Expand Down
3 changes: 0 additions & 3 deletions Documentation/laptops/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := dslm

Expand Down
1 change: 1 addition & 0 deletions Documentation/misc-devices/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir-y := mei
3 changes: 0 additions & 3 deletions Documentation/misc-devices/mei/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := mei-amt-version
HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
Expand Down
8 changes: 1 addition & 7 deletions Documentation/networking/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# Tell kbuild to always build the programs
always := $(hostprogs-y)

obj-m := timestamping/
subdir-y := timestamping
3 changes: 0 additions & 3 deletions Documentation/networking/timestamping/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := timestamping hwtstamp_config

Expand Down
3 changes: 0 additions & 3 deletions Documentation/pcmcia/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := crc32hash

Expand Down
3 changes: 0 additions & 3 deletions Documentation/spi/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := spidev_test spidev_fdx

Expand Down
3 changes: 0 additions & 3 deletions Documentation/timers/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-$(CONFIG_X86) := hpet_example

Expand Down
1 change: 1 addition & 0 deletions Documentation/watchdog/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir-y := src
3 changes: 0 additions & 3 deletions Documentation/watchdog/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := watchdog-simple watchdog-test

Expand Down

0 comments on commit df68a01

Please sign in to comment.