Page 2 of 3
Re: grep doesn't like ./ in pathnames
Posted: Wed Mar 14, 2012 5:04 pm
by Raziel
@nexus
With your line added i get
Makefile.common:158: *** Recursive variable `srcdir' references itself (eventually). Stop.
Re: grep doesn't like ./ in pathnames
Posted: Wed Mar 14, 2012 6:14 pm
by Raziel
If i put the pathsrc = line
Makefile.common:210: *** target pattern contains no `%'. Stop.
The line where it breaks is
$(VERFILE): $(pathsrcdir)/base/internal_version.h
as you can see i already changed the srcdir to pathsrcdir, but it doesn't matter, it breaks whatever i use.
So, still no game
Re: grep doesn't like ./ in pathnames
Posted: Thu Mar 15, 2012 10:26 pm
by broadblues
/RAM Disk>grep SCUMMVM_VERSION "./base/internal_version.h" | cut -d\" -f2
1.5.0git
/RAM Disk>
The issue is not with grep it's working fine.
Hence the issue must be happening higher up the food chain.
/RAM Disk>export FOO=$(grep SCUMMVM_VERSION "./base/internal_version.h" | cut -d\" -f2)
/RAM Disk>echo $FOO
1.5.0git
That also works.
#!/bin/sh
VERSION=$(grep SCUMMVM_VERSION "./base/internal_version.h" | cut -d\" -f2)
echo $VERSION
saved as test.sh
/RAM Disk>test.sh
1.5.0git
/RAM Disk>
So far all simple examples work for me
Just to check again
I have
/RAM Disk>which grep
Programing:SDK/local/C/grep
/RAM Disk>ls -l Programing:SDK/local/C/grep
-rwxrwxrwx 1 root wheel 370066 2009-08-15 23:55 Programing:SDK/local/C/grep
/RAM Disk>grep --version
GNU grep 2.5.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
/RAM Disk>which sh
Programing:SDK/C/sh
/RAM Disk>ls -l Programing:SDK/C/sh
-rwxr-xr-x 1 root wheel 384520 2011-11-08 16:08 Programing:SDK/C/sh
Re: grep doesn't like ./ in pathnames
Posted: Thu Mar 15, 2012 10:29 pm
by broadblues
BTW you never did say what the error was you just said "grep can't handle ....."
Can you run the original failing configure and post the output here?
Re: grep doesn't like ./ in pathnames
Posted: Fri Mar 16, 2012 6:42 pm
by Raziel
broadblues wrote:BTW you never did say what the error was you just said "grep can't handle ....."
Can you run the original failing configure and post the output here?
True...sorry about that
i get
Makefile.common:190: *** target pattern contains no `%'. Stop.
when i run configure and afterwards try to build with make (make throws the erro)r.
Using the command like in makefile.common "by hand" in the dir structure and with the programs the program is (ScummVM) i really do get a non functioning command in which i can´t extract the version number.
Can´t remember if there is an error message or if it simply prints nothing (empty string)
Re: grep doesn't like ./ in pathnames
Posted: Mon Mar 19, 2012 3:35 pm
by Raziel
@broadblues
There seems to be something wrong in my installation?
Ram Disk:> grep "hid" ./T/usb.log | cut -d\| -f2
I get
SDK:Local/C/grep: ./T/usb.log: No such file or directory
in both cases (being in AmigaShell or in abc-shell) but the file is obviously there.
grep --version
GNU grep 2.5.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
which sh
Development:Coding/SDK/C/sh
version sh
abc-shell 53.2 (02.02.2009)
Help? :-/
Re: grep doesn't like ./ in pathnames
Posted: Wed Mar 21, 2012 5:55 am
by Slayer
I know I abandoned this thread a while back but are you sure abc shell is acting correctly if you don't type sh first to drop into the actual shell?
Earlier in this thread someone pointed out that the | operator didn't work outside /Ram Disk/ eg Ram Disk:
I know that's the second part of your commandline but worth mentioning, I'm thinking you might have just typed Ram Disk:> instead of /Ram Disk
Some people insist it doesn't matter but for the sake of type sh first

Re: grep doesn't like ./ in pathnames
Posted: Wed Mar 21, 2012 1:37 pm
by Raziel
Slayer wrote:I know I abandoned this thread a while back but are you sure abc shell is acting correctly if you don't type sh first to drop into the actual shell?
Earlier in this thread someone pointed out that the | operator didn't work outside /Ram Disk/ eg Ram Disk:
I know that's the second part of your commandline but worth mentioning, I'm thinking you might have just typed Ram Disk:> instead of /Ram Disk
Some people insist it doesn't matter but for the sake of type sh first

I tried both shells...AmigaShell and typing sh in AmigaShell (abc-shell)
Both with the same outcome, see my last post