mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Foley <pefoley2@pefoley.com>
To: linux-kernel@vger.kernel.org
Cc: rdunlap@infradead.org, linux-doc@vger.kernel.org,
	Peter Foley <pefoley2@pefoley.com>
Subject: [PATCH 1/4] Documentation: use subdir-y to avoid unnecessary built-in.o files
Date: Thu, 17 Apr 2014 10:11:47 -0400	[thread overview]
Message-ID: <1397743910-18391-1-git-send-email-pefoley2@pefoley.com> (raw)

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 <pefoley2@pefoley.com>
---
 Documentation/Makefile                         | 6 +++---
 Documentation/accounting/Makefile              | 3 ---
 Documentation/auxdisplay/Makefile              | 3 ---
 Documentation/filesystems/Makefile             | 3 ---
 Documentation/ia64/Makefile                    | 3 ---
 Documentation/laptops/Makefile                 | 3 ---
 Documentation/misc-devices/Makefile            | 1 +
 Documentation/misc-devices/mei/Makefile        | 3 ---
 Documentation/networking/Makefile              | 8 +-------
 Documentation/networking/timestamping/Makefile | 3 ---
 Documentation/pcmcia/Makefile                  | 3 ---
 Documentation/spi/Makefile                     | 3 ---
 Documentation/timers/Makefile                  | 3 ---
 Documentation/watchdog/Makefile                | 1 +
 Documentation/watchdog/src/Makefile            | 3 ---
 15 files changed, 6 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/misc-devices/Makefile
 create mode 100644 Documentation/watchdog/Makefile

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 31d302b..605f84f 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -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
diff --git a/Documentation/accounting/Makefile b/Documentation/accounting/Makefile
index 31929eb..7e232cb 100644
--- a/Documentation/accounting/Makefile
+++ b/Documentation/accounting/Makefile
@@ -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
 
diff --git a/Documentation/auxdisplay/Makefile b/Documentation/auxdisplay/Makefile
index 51fe233..ada4dac 100644
--- a/Documentation/auxdisplay/Makefile
+++ b/Documentation/auxdisplay/Makefile
@@ -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
 
diff --git a/Documentation/filesystems/Makefile b/Documentation/filesystems/Makefile
index a5dd114..883010c 100644
--- a/Documentation/filesystems/Makefile
+++ b/Documentation/filesystems/Makefile
@@ -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
 
diff --git a/Documentation/ia64/Makefile b/Documentation/ia64/Makefile
index b75db69..d493163 100644
--- a/Documentation/ia64/Makefile
+++ b/Documentation/ia64/Makefile
@@ -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
 
diff --git a/Documentation/laptops/Makefile b/Documentation/laptops/Makefile
index 5cb144a..0abe44f 100644
--- a/Documentation/laptops/Makefile
+++ b/Documentation/laptops/Makefile
@@ -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
 
diff --git a/Documentation/misc-devices/Makefile b/Documentation/misc-devices/Makefile
new file mode 100644
index 0000000..e2b7aa4
--- /dev/null
+++ b/Documentation/misc-devices/Makefile
@@ -0,0 +1 @@
+subdir-y := mei
diff --git a/Documentation/misc-devices/mei/Makefile b/Documentation/misc-devices/mei/Makefile
index 00e8c3e..d758047 100644
--- a/Documentation/misc-devices/mei/Makefile
+++ b/Documentation/misc-devices/mei/Makefile
@@ -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
diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile
index 0aa1ac9..4c5d7c4 100644
--- a/Documentation/networking/Makefile
+++ b/Documentation/networking/Makefile
@@ -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
diff --git a/Documentation/networking/timestamping/Makefile b/Documentation/networking/timestamping/Makefile
index d934afc..bbe6f81 100644
--- a/Documentation/networking/timestamping/Makefile
+++ b/Documentation/networking/timestamping/Makefile
@@ -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
 
diff --git a/Documentation/pcmcia/Makefile b/Documentation/pcmcia/Makefile
index accde87..47a8fa1 100644
--- a/Documentation/pcmcia/Makefile
+++ b/Documentation/pcmcia/Makefile
@@ -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
 
diff --git a/Documentation/spi/Makefile b/Documentation/spi/Makefile
index a5b03c8..efa2558 100644
--- a/Documentation/spi/Makefile
+++ b/Documentation/spi/Makefile
@@ -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
 
diff --git a/Documentation/timers/Makefile b/Documentation/timers/Makefile
index 73f75f8..6c09ee6 100644
--- a/Documentation/timers/Makefile
+++ b/Documentation/timers/Makefile
@@ -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
 
diff --git a/Documentation/watchdog/Makefile b/Documentation/watchdog/Makefile
new file mode 100644
index 0000000..6018f45
--- /dev/null
+++ b/Documentation/watchdog/Makefile
@@ -0,0 +1 @@
+subdir-y := src
diff --git a/Documentation/watchdog/src/Makefile b/Documentation/watchdog/src/Makefile
index 40e5f46..4a892c3 100644
--- a/Documentation/watchdog/src/Makefile
+++ b/Documentation/watchdog/src/Makefile
@@ -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
 
-- 
1.9.2


             reply	other threads:[~2014-04-17 14:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 14:11 Peter Foley [this message]
2014-04-17 14:11 ` [PATCH 2/4] Documentation: add makefiles for more targets Peter Foley
2014-08-26 16:50   ` Andrey Wagin
2014-04-17 14:11 ` [PATCH 3/4] Documentation: make functions static to avoid prototype warnings Peter Foley
2014-04-17 14:11 ` [PATCH 4/4] Documentation: fix misc. warnings Peter Foley
2014-06-29  2:23 ` [PATCH 1/4] Documentation: use subdir-y to avoid unnecessary built-in.o files Randy Dunlap
2014-07-09 20:52   ` Sam Ravnborg
2014-08-25 20:33 ` Randy Dunlap
2014-09-02 22:58   ` Peter Foley
2014-09-02 23:24     ` Randy Dunlap
2014-09-02 23:29       ` Mark Brown
2014-09-03 23:08         ` Peter Foley
2014-09-03 23:21           ` Mark Brown
2014-09-03 23:38             ` Randy Dunlap
2014-09-03 23:49               ` Mark Brown
2014-09-04 10:42               ` Mark Brown
2014-09-06  0:07                 ` Randy Dunlap
2014-09-07 17:59                   ` Randy Dunlap
2014-09-07 18:48                     ` Mark Brown
2014-09-07 20:52                       ` Randy Dunlap
2014-09-08  8:03                       ` Stephen Rothwell
2014-09-08 10:22                         ` Mark Brown
2014-09-08 14:57                           ` Stephen Rothwell

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=1397743910-18391-1-git-send-email-pefoley2@pefoley.com \
    --to=pefoley2@pefoley.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.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

all inboxes | Powered by JetHome®