[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.



On Thu, Aug 28, 2008 at 03:39:39PM +0100, Ian Jackson wrote:
> Isaku Yamahata writes ("[Xen-devel] [PATCH] ioemu-remote: fix cross 
> compilation."):
> > When cross compile, INSTALL is set to cross-install by --install
> > configure option.
> >
> > However it is overwritten by including $(XEN_ROOT)/tools/Rules.mk
> > so that install command fails to strip as follows.
> > So after the include set INSTALL again when --install is passed
> > to configure.
> 
> I think this is quite ugly really.  We're engaging in a war of
> makefiles.  Why can't Rules.mk set the right version of install ?
> 
> Ian.

Yes, it's ugly. How about the followings? Which do you prefer?
One candidate is to modify ioemu-remote/Makefile, Makefile.target,
another is for the xen-unstable. Making INSTALL overridable
isn't intuit...

qemu-dm and qemu-dm-xen are the only commands in the xen source tree
which is installed with strip option, "-s".
The issue isn't which install command is used, but which strip
command is invoked by the install command.
GCC knows where commands are stored, however the install command
doesn't. tools/cross-install is a simple wrapper shell script to
set up PATH for the install command to find the correct strip command
by adding a directory in front of PATH.
Modifying PATH in tools/Makefile doesn't work because the install
command is invoked via shell which resets PATH.


diff --git a/Makefile b/Makefile
index bebd244..b055b3f 100644
--- a/Makefile
+++ b/Makefile
@@ -205,7 +205,7 @@ endif
 install: all $(if $(BUILD_DOCS),install-doc)
        mkdir -p "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
-       $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+       $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
 endif
        mkdir -p "$(DESTDIR)$(datadir)"
        set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
diff --git a/Makefile.target b/Makefile.target
index 1aace9c..e796d61 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -707,7 +707,7 @@ clean:
 
 install: all install-hook
 ifneq ($(PROGS),)
-       $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+       $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
 endif
 
 # Include automatically generated dependency files


---------------------------------------------------------------------------
or

diff -r 7f653c6ce545 config/StdGNU.mk
--- a/config/StdGNU.mk  Mon Aug 25 12:37:36 2008 +0900
+++ b/config/StdGNU.mk  Fri Aug 29 11:12:41 2008 +0900
@@ -16,7 +16,7 @@
 # Allow git to be wrappered in the environment
 GIT        ?= git
 
-INSTALL      = install
+INSTALL      ?= install
 INSTALL_DIR  = $(INSTALL) -d -m0755 -p
 INSTALL_DATA = $(INSTALL) -m0644 -p
 INSTALL_PROG = $(INSTALL) -m0755 -p
diff -r 7f653c6ce545 config/SunOS.mk
--- a/config/SunOS.mk   Mon Aug 25 12:37:36 2008 +0900
+++ b/config/SunOS.mk   Fri Aug 29 11:12:41 2008 +0900
@@ -14,7 +14,7 @@
 
 SHELL      = bash
 
-INSTALL      = ginstall
+INSTALL      ?= ginstall
 INSTALL_DIR  = $(INSTALL) -d -m0755 -p
 INSTALL_DATA = $(INSTALL) -m0644 -p
 INSTALL_PROG = $(INSTALL) -m0755 -p



-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.