?RCS: $Id: startperl.U,v 3.0 1993/08/18 12:09:50 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi ?RCS: ?RCS: This file is included with or a derivative work of a file included ?RCS: with the metaconfig program of Raphael Manfredi's "dist" distribution. ?RCS: In accordance with clause 7 of dist's modified Artistic License: ?RCS: ?RCS: You may distribute under the terms of either the GNU General Public ?RCS: License or the Artistic License, as specified in the README file. ?RCS: ?RCS: $Log: startperl.U,v $ ?RCS: Perl5 version -- I always have d_portable=define. ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:50 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:startperl: cat Myread sharpbang initialinstalllocation test \ versiononly version ?MAKE: -pick add $@ %< ?Y:TOP ?X: This is different from dist's standard startperl.U unit because ?X: we can't directly test #!/usr/local/bin/perl (or whatever) because ?X: we haven't built and installed perl yet. ?S:startperl: ?S: This variable contains the string to put on the front of a perl ?S: script to make sure (hopefully) that it runs with perl and not some ?S: shell. Of course, that leading line must be followed by the classical ?S: perl idiom: ?S: eval 'exec perl -S $0 ${1+"$@"}' ?S: if $running_under_some_shell; ?S: to guarantee perl startup should the shell execute the script. Note ?S: that this magic incantation is not understood by csh. ?S:. ?C:STARTPERL: ?C: This variable contains the string to put in front of a perl ?C: script to make sure (one hopes) that it runs with perl and not ?C: some shell. ?C:. ?H:#define STARTPERL "$startperl" /**/ ?H:. : figure out how to guarantee perl startup : XXX Note that this currently takes advantage of the bug that binexp ignores : the Configure -Dinstallprefix setting, which in turn means that under : relocatable @INC, initialinstalllocation is what binexp started as. case "$startperl" in '') case "$sharpbang" in *!) $cat <&4 <