Hi everyone - got a question about GPC

Maurice Lombardi Maurice.Lombardi at ujf-grenoble.fr
Wed Feb 17 12:08:48 CET 2010


Rugxulo a écrit :
> Hi,
> 
> On Tue, Feb 16, 2010 at 11:45 AM, Maurice Lombardi
> <Maurice.Lombardi at ujf-grenoble.fr> wrote:
>> In fact for that reason, in my personal works I always use the option -o
>> blah.exe. This causes no extra typing because I work in an editor able to
>> launch a compiler with a single click through a script like
>>
>> #! /bin/sh
>> echo $MSYSTEM
>> gp $(basename "$1" | tr [A-Z] [a-z]) \
>>        -o $(basename "$1" | sed -e 's/\(.*\)\.[^.]*$/\1\.exe/') \
>>        $2 -march=prescott \
>>        --unit-path=. --unit-path=c:/lombardi/$MSYSTEM/gpc/pascal_u \
>>        --unit-path=c:/$MSYSTEM/units \
>>        --unit-destination-path=c:/lombardi/$MSYSTEM/o \
>>        `head -n 1 "$1" | sed -e '/^[^"]*$/d;s/^[^"]*"//;s/"[^"]*$//'` \
>>        2>&1 | sed ':1;s,/[^/.][^/]*/\.\./,/,;t 1'
>>
> 
> Whew! Perl, where are you when we need you?  :-)    Anyways, you could
> probably also use sed instead of tr and head; that would be cleaner,
> IMHO. But I'm not very *nix savvy, so who cares.   ;-)

not me, but writing one script every other year is something I can do, 
especially if it is used many times meanwhile

> 
>> $2 is --autobuild or nothing
> 
> --autobuild even when using GP? Or was that meant to be "gpc"?

An old habit to recompile all units when starting a new program, for 
fear that change of compilation parameters is not taken properly into 
account. This is no more necessary since the gpd files contain them.
As usual "better safe than sorry" keeps alive obsolete habits

Maurice

-- 
        Maurice Lombardi
Laboratoire de  Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex     FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi at ujf-grenoble.fr





More information about the Gpc mailing list