Skip to contentSkip to conversation

Documentation/kbuild: correct variable definitions in makefiles.txt

PATCH In review matt mooney 3 participants 6 messages Sep 20, 2010 – Oct 2, 2010

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

PATCH 1/1 Documentation/kbuild: correct variable definitions in makefiles.txt

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

---

Hmm, this file is also _full_ of bad grammar and might be out of date FAIK. If you would like it updated/corrected, please let me know. I don't mind doing this, but only if it is beneficial and wanted.

 Documentation/kbuild/makefiles.txt |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
Documentation/kbuild/makefiles.txt +5 -6
index c787ae5..fe162f5 100644
@@ -376,14 +376,13 @@ more details, with real examples.
 	Two variables are used when defining special rules:
 
     $(src)
-	$(src) is a relative path which points to the directory
-	where the Makefile is located. Always use $(src) when
-	referring to files located in the src tree.
+	The absolute path to the directory where the makefile is
+	located. Always use $(src) when referring to files located
+	in the src directory.
 
     $(obj)
-	$(obj) is a relative path which points to the directory
-	where the target is saved. Always use $(obj) when
-	referring to generated files.
+	The absolute path to the directory where the target is saved.
+	Always use $(obj) when referring to generated files.
 
 	Example:
 		#drivers/scsi/Makefile
Signature · 1 line
1.7.2.1
#1 lore raw
Quoted 2 lines · matt mooney

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

It _is_ a relative patch, AFAICS. What makes you think otherwise?

BTW, I applied your patches to modules.txt, thanks for them.

Michal

#2 lore raw
Quoted 5 lines · Michal Marek
Quoted 2 lines · matt mooney

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

It _is_ a relative patch, AFAICS. What makes you think otherwise?

With extenal modules $(src) and $(obj) are absolute - but in nomal use they are relative. And again in normal use they are also equal. I usually say that we have two just to document what is srource and what is generated.

Sam

#3 lore raw
Quoted 10 lines · Sam Ravnborg
Quoted 5 lines · Michal Marek
Quoted 2 lines · matt mooney

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

It _is_ a relative patch, AFAICS. What makes you think otherwise?

With extenal modules $(src) and $(obj) are absolute - but in nomal use they are relative. And again in normal use they are also equal. I usually say that we have two just to document what is srource and what is generated.

Ah, I see. Sorry, I should have looked into this more. Now you did say in normal use they are equal, but I thought they were also equal when used for an external module too. Am I missing something?

Thanks,
mfm

#4 lore raw
Quoted 10 lines · matt mooney
Quoted 9 lines · Sam Ravnborg
Quoted 5 lines · Michal Marek
Quoted 2 lines · matt mooney

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

It _is_ a relative patch, AFAICS. What makes you think otherwise?

With extenal modules $(src) and $(obj) are absolute - but in nomal use they are relative.

Ah, I see. Then we should simply say "path", without any adjectives.

Quoted 6 lines
Quoted 2 lines

And again in normal use they are also equal. I usually say that we have two just to document what is srource and what is generated.

Ah, I see. Sorry, I should have looked into this more. Now you did say in normal use they are equal, but I thought they were also equal when used for an external module too.

Yes, they are, using $(src) for shipped files and $(obj) for generated ones is just a service for the reader of the Makefile.

Michal

#5 lore raw
Quoted 7 lines · Michal Marek
Quoted 6 lines · matt mooney
Quoted 5 lines · Sam Ravnborg
Quoted 4 lines · Michal Marek
Quoted 2 lines · matt mooney

Change $(src) and $(obj) definitions to state the path as absolute and not relative.

Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line

It _is_ a relative patch, AFAICS. What makes you think otherwise?

With extenal modules $(src) and $(obj) are absolute - but in nomal use they are relative.

Ah, I see. Then we should simply say "path", without any adjectives.

That may lead to people wondering what kind of path it is, or assumptions that it is absolute due to being stated as such in modules.txt. Maybe a more detailed explanation would suffice.

-mfm