forked from mirrors/linux
		
	kbuild: Use relative path when building in a subdir of the source tree
When doing make O=<subdir>, use '..' to refer to the source tree. This allows for more readable compiler messages, and, more importantly, it sets the VPATH to '..', so filenames in WARN_ON() etc. will be shorter. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
		
							parent
							
								
									890676c65d
								
							
						
					
					
						commit
						9da0763bdd
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							|  | @ -149,7 +149,17 @@ else | ||||||
| _all: modules | _all: modules | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| srctree		:= $(if $(KBUILD_SRC),$(KBUILD_SRC),.) | ifeq ($(KBUILD_SRC),) | ||||||
|  |         # building in the source tree | ||||||
|  |         srctree := . | ||||||
|  | else | ||||||
|  |         ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) | ||||||
|  |                 # building in a subdirectory of the source tree | ||||||
|  |                 srctree := .. | ||||||
|  |         else | ||||||
|  |                 srctree := $(KBUILD_SRC) | ||||||
|  |         endif | ||||||
|  | endif | ||||||
| objtree		:= . | objtree		:= . | ||||||
| src		:= $(srctree) | src		:= $(srctree) | ||||||
| obj		:= $(objtree) | obj		:= $(objtree) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Michal Marek
						Michal Marek