----- Original Message -----
From: Cliff Wickman <cpw(a)sgi.com>
I build crash on systems that don't always have the git command
as /usr/bin/git.
Could you allow git to be in various places? Something like below?
Signed-off-by: Cliff Wickman <cpw(a)sgi.com>
---
extensions/eppic.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: crash-6.0.8/extensions/eppic.mk
===================================================================
--- crash-6.0.8.orig/extensions/eppic.mk
+++ crash-6.0.8/extensions/eppic.mk
@@ -24,7 +24,8 @@ all:
then \
if [ ! -f $(APPFILE) ]; \
then \
- if [ -f /usr/bin/git ]; \
+ GIT=`which git 2> /dev/null`; \
+ if [ -f $${GIT} ]; \
then \
git clone
https://code.google.com/p/eppic eppic; \
else \
Cliff,
I've got the GOOGLE-check stuff queued, and haven't gotten around to checking
Per's patch yet, but to keep things a bit clearer, how's this work for you?:
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
ifeq ($(TARGET), PPC64)
TARGET_FLAGS = -D$(TARGET) -m64
else
TARGET_FLAGS = -D$(TARGET)
endif
CRASH_REF_ROOT=
APPFILE=eppic/applications/crash/eppic.c
GOOGLE := $(shell ping -c 1
code.google.com | grep "1 received")
GIT := $(shell which git 2> /dev/null)
all:
@if [ -f /usr/bin/flex ] && [ -f /usr/bin/bison ]; then \
if [ -f ../$(GDB)/crash.target ]; \
then \
if [ ! -f $(APPFILE) ]; \
then \
if [ -f "$(GIT)" ] && [ -n "$(GOOGLE)" ] ; \
then \
git clone
https://code.google.com/p/eppic eppic; \
else \
if [ ! -f "$(GIT)" ]; then \
echo "eppic.so: git command is needed for pulling eppic extension
code"; \
fi; \
fi; \
fi; \
if [ -f $(APPFILE) ]; \
then \
make -f eppic.mk eppic.so; \
else \
echo "eppic.so: failed to pull eppic code from git repo"; \
fi; \
else \
echo "eppic.so: build failed: requires the crash $(GDB) module"; \
fi ;\
else \
echo "eppic.so: build failed: requires /usr/bin/flex and /usr/bin/bison"; \
fi
lib-eppic:
cd eppic/libeppic && make
eppic.so: ../defs.h $(APPFILE) lib-eppic
gcc -g -I.. -Ieppic/libeppic -I../$(GDB)/bfd -I../$(GDB)/include -I../$(GDB)/gdb
-I../$(GDB)/gdb/config -I../$(GDB)/gdb/common -I../$(GDB) -nostartfiles -shared -rdynamic
-o eppic.so $(APPFILE) -fPIC $(TARGET_FLAGS) $(GDB_FLAGS) -Leppic/libeppic -leppic
clean:
if [ -d eppic/libeppic ]; \
then \
cd eppic/libeppic && make -i clean; \
fi
rm -f eppic.so