This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid dogfood problems when an empty string accidentally ends up
[perl5.git] / makeaperl.SH
old mode 100755 (executable)
new mode 100644 (file)
index 6af9419..80c0f21
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $PERL_CONFIG_SH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -17,10 +17,11 @@ case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
 echo "Extracting makeaperl (with variable substitutions)"
+rm -f makeaperl
 $spitshell >makeaperl <<!GROK!THIS!
 $startperl
-    eval 'exec perl -S \$0 "\$@"'
-       if 0;
+    eval 'exec $perlpath -S \$0 \${1+"\$@"}'
+       if \$running_under_some_shell;
 !GROK!THIS!
 
 $spitshell >>makeaperl <<'!NO!SUBS!'