X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=writemain.SH;h=025d954241a4d517c856127814dcfbcedc63f35f;hb=e897d888ddc4bb69b5f488b85e1c82dbaeaf240b;hp=66d14a16ce5a33880f5a43596139aae54aa4b1a2;hpb=14ee6a0a4e91958442c75ae3fa016d5431833702;p=p5sagit%2Fp5-mst-13.2.git diff --git a/writemain.SH b/writemain.SH index 66d14a1..025d954 100644 --- a/writemain.SH +++ b/writemain.SH @@ -37,7 +37,11 @@ $spitshell >>writemain <<'!NO!SUBS!' orig="$*" args='' : Remove any .a suffixes and any leading path components -for file in `echo $orig | sed 's/\.a//g'` ; do +for file in $orig ; do + case "$file" in + *.a) file=`echo $file | sed 's/\.a//g'` + ;; + esac case "$file" in ext/*) file=`echo $file | sed 's:ext/\(.*\)/[^/]*:\1:'` ;; @@ -70,11 +74,12 @@ cat << 'EOP' static void xs_init() { - dXSUB_SYS; EOP if test X"$args" != "X" ; then echo " char *file = __FILE__;" + echo " dXSUB_SYS;" + ai='' for ext in $args ; do @@ -84,7 +89,6 @@ if test X"$args" != "X" ; then mname=`echo $ext | sed 's!/!::!g'` cname=`echo $mname | sed 's!:!_!g'` - echo " {" if test "$ext" = "DynaLoader"; then : Must NOT install 'DynaLoader::boot_DynaLoader' as 'bootstrap'! : boot_DynaLoader is called directly in DynaLoader.pm @@ -92,7 +96,6 @@ if test X"$args" != "X" ; then else echo " newXS(\"${mname}::bootstrap\", boot_${cname}, file);" fi - echo " }" done fi