[GRASS5] g.html2man: perl location problem
Eric G. Miller
egm2 at jps.net
Thu Mar 1 21:53:22 EST 2001
On Thu, Mar 01, 2001 at 04:45:07PM +0700, Justin Hickey wrote:
> Hi Markus
>
> Markus Neteler wrote:
> >
> > Hi all,
> >
> > as the path to "perl" is hardcoded in
> > src/scripts/contrib/g.html2man/g.html2man
> >
> > the command:
> > gmake5 html
> > fails on several platforms (like CRAY where it is in
> > /opt/gnu/bin/perl
> >
> > Today I have added the missding
> > PERL = @PERL@
> > into src/CMD/head/head.in
> >
> > Can we utilize this? Maybe similar to the wrapper
> > line used for tcltkgrass?
>
> Yes, perl has a similar method. The following is from the "Programming
> Perl" book:
>
> #!/bin/sh -- #perl, to stop looping
> eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
> if 0;
>
> .. rest of perl script ...
>
> It's strange but it seems to work for me. In this case you simply
> substitute maybe $GRASS_PERL for /usr/bin/perl.
s@/usr/bin/perl at perl@ in the above "eval 'exec ...'", then it shouldn't
matter where perl lives as long as it's in $PATH. Some other techniques
are in "man perlrun". One other, which may not always exist:
#! /usr/bin/env perl
--
Eric G. Miller <egm2 at jps.net>
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list