allow various git command locations
From: Cliff Wickman <cpw@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@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 -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility |
allow various git command locations
----- Original Message -----
> > From: Cliff Wickman <cpw@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@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 -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility |
allow various git command locations
On Tue, Aug 07, 2012 at 10:58:17AM -0400, Dave Anderson wrote:
> > > ----- Original Message ----- > > > > From: Cliff Wickman <cpw@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@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 > -- > Crash-utility mailing list > Crash-utility@redhat.com > https://www.redhat.com/mailman/listinfo/crash-utility Hi Dave, Yes. I tried it and it worked well. Thx. -Cliff -- Cliff Wickman SGI cpw@sgi.com (651) 683-3824 -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility |
| All times are GMT. The time now is 01:15 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.