linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [uml-devel] [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
       [not found] <20080101071311.GA2496@hacking>
@ 2008-01-01  7:18 ` WANG Cong
  2008-01-01 10:33   ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: WANG Cong @ 2008-01-01  7:18 UTC (permalink / raw)
  To: LKML
  Cc: Andrew Morton, jdike, Sam Ravnborg, user-mode-linux-devel,
	linux-kbuild


TOPDIR is obsolete, use objtree 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..57491af 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 $(objtree)/$(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 $(objtree)/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..a3cfae7 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$(objtree)/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 $(objtree)/arch/ppc/kernel/$@ $@
 
 checksum.S:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/lib/$@ $@
+	ln -s $(objtree)/arch/ppc/lib/$@ $@
 
 mk_defs.c:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@
+	ln -s $(objtree)/arch/ppc/kernel/$@ $@
 
 ppc_defs.head:
 	rm -f $@
-	ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@
+	ln -s $(objtree)/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
+		$(objtree)/include/asm-ppc/mmu.h \
+		$(objtree)/include/asm-ppc/processor.h \
+		$(objtree)/include/asm-ppc/pgtable.h \
+		$(objtree)/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 $(objtree)/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 $(objtree)/include/asm-ppc asm
 	$(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
 	rm -f asm
 
diff --git a/arch/x86/Makefile_32 b/arch/x86/Makefile_32

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
  2008-01-01  7:18 ` [uml-devel] [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles WANG Cong
@ 2008-01-01 10:33   ` Sam Ravnborg
  2008-01-01 10:49     ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2008-01-01 10:33 UTC (permalink / raw)
  To: WANG Cong; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel, linux-kbuild

On Tue, Jan 01, 2008 at 03:18:46PM +0800, WANG Cong wrote:
> 
> TOPDIR is obsolete, use objtree instead.
> This patch removes TOPDIR from all UML Makefiles.
> 

I do not feel confident with these changes.
In some places I had expected to see srctree and not objtree.
I would like to see this tested before applying it.

Building a ppc toolchain now to test it...

	Sam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
  2008-01-01 10:33   ` Sam Ravnborg
@ 2008-01-01 10:49     ` Sam Ravnborg
  2008-01-01 13:01       ` [uml-devel] (Try #2) " WANG Cong
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2008-01-01 10:49 UTC (permalink / raw)
  To: WANG Cong; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel, linux-kbuild

On Tue, Jan 01, 2008 at 11:33:42AM +0100, Sam Ravnborg wrote:
> On Tue, Jan 01, 2008 at 03:18:46PM +0800, WANG Cong wrote:
> > 
> > TOPDIR is obsolete, use objtree instead.
> > This patch removes TOPDIR from all UML Makefiles.
> > 
> 
> I do not feel confident with these changes.
> In some places I had expected to see srctree and not objtree.
> I would like to see this tested before applying it.
> 
> Building a ppc toolchain now to test it...

It seems that building a ppc based um kernel is not supported
in mainline.
Kconfig.ppc is missing and when creating it um build fails
in sys-ppc/ due to user-offset.c is missing.

As most of your patch touches ppc specific code I suggest
to just replace TOPDIR with srctree all over (no semantic change)
and the the um people can figure out the ppc stuff when they get to it.

	Sam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [uml-devel] (Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
  2008-01-01 10:49     ` Sam Ravnborg
@ 2008-01-01 13:01       ` WANG Cong
  2008-01-02 15:02         ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: WANG Cong @ 2008-01-01 13:01 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Andrew Morton, user-mode-linux-devel, linux-kbuild, jdike, LKML,
	WANG Cong

On Tue, Jan 01, 2008 at 11:49:42AM +0100, Sam Ravnborg wrote:
>On Tue, Jan 01, 2008 at 11:33:42AM +0100, Sam Ravnborg wrote:
>> On Tue, Jan 01, 2008 at 03:18:46PM +0800, WANG Cong wrote:
>> > 
>> > TOPDIR is obsolete, use objtree instead.
>> > This patch removes TOPDIR from all UML Makefiles.
>> > 
>> 
>> I do not feel confident with these changes.
>> In some places I had expected to see srctree and not objtree.
>> I would like to see this tested before applying it.
>> 
>> Building a ppc toolchain now to test it...
>
>It seems that building a ppc based um kernel is not supported
>in mainline.
>Kconfig.ppc is missing and when creating it um build fails
>in sys-ppc/ due to user-offset.c is missing.
>
>As most of your patch touches ppc specific code I suggest
>to just replace TOPDIR with srctree all over (no semantic change)
>and the the um people can figure out the ppc stuff when they get to it.

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
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [uml-devel] (Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
  2008-01-01 13:01       ` [uml-devel] (Try #2) " WANG Cong
@ 2008-01-02 15:02         ` Jeff Dike
  2008-01-02 17:27           ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2008-01-02 15:02 UTC (permalink / raw)
  To: WANG Cong
  Cc: Andrew Morton, Sam Ravnborg, LKML, user-mode-linux-devel,
	linux-kbuild

On Tue, Jan 01, 2008 at 09:01:25PM +0800, WANG Cong wrote:
> TOPDIR is obsolete, use srctree instead.
> This patch removes TOPDIR from all UML Makefiles.

Thanks, I'll send this to Andrew.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] (Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
  2008-01-02 15:02         ` Jeff Dike
@ 2008-01-02 17:27           ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2008-01-02 17:27 UTC (permalink / raw)
  To: Jeff Dike
  Cc: Andrew Morton, WANG Cong, LKML, user-mode-linux-devel,
	linux-kbuild

On Wed, Jan 02, 2008 at 10:02:55AM -0500, Jeff Dike wrote:
> On Tue, Jan 01, 2008 at 09:01:25PM +0800, WANG Cong wrote:
> > TOPDIR is obsolete, use srctree instead.
> > This patch removes TOPDIR from all UML Makefiles.
> 
> Thanks, I'll send this to Andrew.

Thanks Jeff.

	Sam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-02 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080101071311.GA2496@hacking>
2008-01-01  7:18 ` [uml-devel] [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles WANG Cong
2008-01-01 10:33   ` Sam Ravnborg
2008-01-01 10:49     ` Sam Ravnborg
2008-01-01 13:01       ` [uml-devel] (Try #2) " WANG Cong
2008-01-02 15:02         ` Jeff Dike
2008-01-02 17:27           ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).