(Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Sam Ravnborg <sam@...>
Cc: WANG Cong <xiyou.wangcong@...>, LKML <linux-kernel@...>, <linux-kbuild@...>, Andrew Morton <akpm@...>, <jdike@...>, <user-mode-linux-devel@...>
Date: Tuesday, January 1, 2008 - 9:01 am

On Tue, Jan 01, 2008 at 11:49:42AM +0100, Sam Ravnborg wrote:

You're right. I use srctree instead. And tested with:

$ make O=../foobar/ ARCH=um linux

It works fine. Thanks for your points!

-------->

TOPDIR is obsolete, use srctree instead.
This patch removes TOPDIR from all UML Makefiles.

Cc: Jeff Dike <jdike@addtoit.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/arch/um/Makefile b/arch/um/Makefile
index ba6813a..08a2865 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -158,7 +158,7 @@ ifneq ($(KBUILD_SRC),)
 	$(Q)mkdir -p $(objtree)/include/asm-um
 	$(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
 else
-	$(Q)cd $(TOPDIR)/$(dir $@) ; \
+	$(Q)cd $(srctree)/$(dir $@) ; \
 	ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@)
 endif
 
@@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),)
 	$(Q)mkdir -p $(objtree)/include/asm-um
 	$(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch
 else
-	$(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch
+	$(Q)cd $(srctree)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch
 endif
 
 $(objtree)/$(ARCH_DIR)/include:
diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile
index a9814a7..0890152 100644
--- a/arch/um/sys-ppc/Makefile
+++ b/arch/um/sys-ppc/Makefile
@@ -6,7 +6,7 @@ OBJ = built-in.o
 OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \
 	ptrace_user.o sysrq.o
 
-EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(TOPDIR)/arch/ppc/kernel
+EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel
 
 all: $(OBJ)
 
@@ -22,25 +22,25 @@ sigcontext.o: sigcontext.c
 
 semaphore.c:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@
+	ln -s $(srctree)/arch/ppc/kernel/$@ $@
 
 checksum.S:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/lib/$@ $@
+	ln -s $(srctree)/arch/ppc/lib/$@ $@
 
 mk_defs.c:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@
+	ln -s $(srctree)/arch/ppc/kernel/$@ $@
 
 ppc_defs.head:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@
+	ln -s $(srctree)/arch/ppc/kernel/$@ $@
 
 ppc_defs.h: mk_defs.c ppc_defs.head \
-		$(TOPDIR)/include/asm-ppc/mmu.h \
-		$(TOPDIR)/include/asm-ppc/processor.h \
-		$(TOPDIR)/include/asm-ppc/pgtable.h \
-		$(TOPDIR)/include/asm-ppc/ptrace.h
+		$(srctree)/include/asm-ppc/mmu.h \
+		$(srctree)/include/asm-ppc/processor.h \
+		$(srctree)/include/asm-ppc/pgtable.h \
+		$(srctree)/include/asm-ppc/ptrace.h
 #	$(CC) $(CFLAGS) -S mk_defs.c
 	cp ppc_defs.head ppc_defs.h
 # for bk, this way we can write to the file even if it's not checked out
@@ -56,13 +56,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
 
 checksum.o: checksum.S
 	rm -f asm
-	ln -s $(TOPDIR)/include/asm-ppc asm
+	ln -s $(srctree)/include/asm-ppc asm
 	$(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
 	rm -f asm
 
 misc.o: misc.S ppc_defs.h
 	rm -f asm
-	ln -s $(TOPDIR)/include/asm-ppc asm
+	ln -s $(srctree)/include/asm-ppc asm
 	$(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
 	rm -f asm
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 0/8] Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:13 am)
Re: [Patch 0/8] Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Wed Jan 2, 5:51 am)
Re: [Patch 0/8] Remove 'TOPDIR' from Makefiles, WANG Cong, (Thu Jan 3, 12:37 am)
Re: [Patch 0/8] Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:09 am)
[Patch 8/8] Remove 'TOPDIR' from the Top Makefile, WANG Cong, (Tue Jan 1, 3:43 am)
[Patch 7/8] FS: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:41 am)
(Try #3) [Patch 7/8] FS: Remove dead code, WANG Cong, (Wed Jan 2, 1:55 am)
Re: [Patch 7/8] FS: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:30 am)
[Patch 6/8] FRV: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:36 am)
Re: [Patch 6/8] FRV: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:27 am)
[Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:29 am)
Re: [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:20 am)
[Patch 3/8] S390: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:25 am)
Re: [Patch 3/8] S390: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:17 am)
Re: (Try #2) [Patch 3/8] S390: Tiny fixes for Makefile, Sam Ravnborg, (Tue Jan 1, 1:42 pm)
Re: (Try #3) [Patch 3/8] S390: Remove 'TOPDIR' from Makefile, Martin Schwidefsky, (Wed Jan 2, 5:31 am)
[Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:22 am)
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:15 am)
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles, Andreas Schwab, (Tue Jan 1, 9:44 am)
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 1:57 pm)
[Patch 1/8] UML: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 3:18 am)
Re: [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:33 am)
Re: [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles, Sam Ravnborg, (Tue Jan 1, 6:49 am)
(Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles, WANG Cong, (Tue Jan 1, 9:01 am)