This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: Makefile.SH workaround for shell bug
authorAndy Broad <andy@broad.ology.org.uk>
Thu, 27 Aug 2015 22:32:35 +0000 (18:32 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 5 Sep 2015 15:12:43 +0000 (11:12 -0400)
Makefile.SH

index de6d6c9..ad220bf 100755 (executable)
@@ -709,7 +709,21 @@ generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
 ;;
 esac
 
+case "$osname" in
+amigaos*)
+$spitshell >>$Makefile <<'!NO!SUBS!'
+perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
+       $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
 
+# The file ext.libs is a list of libraries that must be linked in
+# for static extensions, e.g. -lm -lgdbm, etc.  The individual
+# static extension Makefile's add to it.
+ext.libs: $(static_ext)
+       -@test -f ext.libs || touch ext.libs
+
+!NO!SUBS!
+;;
+*)
 $spitshell >>$Makefile <<'!NO!SUBS!'
 perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib
        $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext)
@@ -721,6 +735,8 @@ ext.libs: $(static_ext)
        -@test -f ext.libs || touch ext.libs
 
 !NO!SUBS!
+;;
+esac
 
 # How to build libperl.  This is still rather convoluted.
 # Load up custom Makefile.SH fragment for shared loading and executables:
@@ -885,6 +901,16 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
 !NO!SUBS!
 
        case "${osname}${osvers}" in
+       amigaos*)
+               $spitshell >>$Makefile <<'!NO!SUBS!'
+lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
+       -@rm -f miniperl.xok
+       $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
+           $(mini_obj) $(libs)
+#      $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
+       $(MINIPERL) -f write_buildcustomize.pl
+!NO!SUBS!
+               ;;
        aix*)
                $spitshell >>$Makefile <<'!NO!SUBS!'
 lib/buildcustomize.pl: $& $(mini_obj)