[Cbe-oss-dev] [PATCH] libspe: fix minor makefile problems

Jeremy Kerr jk at ozlabs.org
Tue Nov 14 14:25:31 EST 2006


This change fixes two minor makefile problems:

There is no elfspe-unregister program, so make install fails with
non-zero exit status. This is the last command, so all files are
installed - it's only the exit code that's affected.

The "[" shell command uses =, not ==, to test for equality. However,
these checks can be simplfied to not require the [ ] tests at all.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---

 Makefile |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Index: libspe/Makefile
===================================================================
--- libspe.orig/Makefile
+++ libspe/Makefile
@@ -18,10 +18,10 @@
 #*
 
 
-X86 = $(shell if [ "`uname -m | grep  ppc`" == "" ] ; then echo 1 ; fi)
+X86 = $(shell if uname -m | grep ppc > /dev/null; then echo 1; fi)
 
-CROSS_COMPILE = $(shell if [ "`cat /proc/cpuinfo | grep Broadband`" == "" ] ; \
-		  then echo 1 ; fi)
+CROSS_COMPILE = $(shell if grep Broadband /proc/cpuinfo > /dev/null; \
+		  then echo 1; fi)
 
 ifeq "$(X86)"  "1"
     CROSS	?= /opt/cell/toolchain-3.3/ppu/bin/ppu-
@@ -107,7 +107,6 @@ install: spe.h $(libspe_SO) elfspe elfsp
 	$(INSTALL_DIR)			   $(ROOT)$(bindir)
 	$(INSTALL_PROGRAM) elfspe	   $(ROOT)$(bindir)/elfspe
 	$(INSTALL_PROGRAM) elfspe-register $(ROOT)$(bindir)/elfspe-register
-	$(INSTALL_PROGRAM) elfspe-unregister $(ROOT)$(bindir)/elfspe-unregister
 
 tests: tests/Makefile
 	make -C tests



More information about the cbe-oss-dev mailing list