Skip to contentSkip to conversation

doc: describe Kbuild pitfall

PATCH New [email protected] 1 participant 1 message Mar 20, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: describe Kbuild pitfall

From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Cc: Sam Ravnborg <[email protected]>

Whitespace is significant for make, and I just fought against this... so please apply this patch.

---

 linux-2.6.11-paolo/Documentation/kbuild/makefiles.txt |    6 ++++++
 1 files changed, 6 insertions(+)
Documentation/kbuild/makefiles.txt renamed from Documentation/kbuild/makefiles.txt~doc-add-pitfall +6 -0
diff -puN Documentation/kbuild/makefiles.txt~doc-add-pitfall Documentation/kbuild/makefiles.txt
@@ -872,7 +872,13 @@ When kbuild executes the following steps
 	Assignments to $(targets) are without $(obj)/ prefix.
 	if_changed may be used in conjunction with custom commands as
 	defined in 6.7 "Custom kbuild commands".
+
 	Note: It is a typical mistake to forget the FORCE prerequisite.
+	Another pitfall that bit me once is that whitespace is sometimes
+	significant; for instance, the below will fail (note the extra space
+	after the comma):
+		target: source(s) FORCE
+			$(call if_changed, ld/objcopy/gzip)
 
     ld
 	Link target. Often LDFLAGS_$@ is used to set specific options to ld.

_