This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move email alias from AUTHORS to checkAUTHORS.pl
[perl5.git] / Makefile.SH
index bc5837e..2278f9f 100755 (executable)
@@ -20,6 +20,15 @@ case $PERL_CONFIG_SH in
        ;;
 esac
 
+case "$osname" in
+amigaos)
+       devtty=CONSOLE:
+       ;;
+*)
+       devtty=/dev/tty
+       ;;
+esac
+
 Makefile=Makefile
 
 : This forces SH files to create target in same directory as SH file.
@@ -350,6 +359,9 @@ public = \$(PERL_EXE) utilities
 
 shellflags = $shellflags
 
+# The /dev/tty or the moral equivalent.
+devtty = $devtty
+
 # This is set to  MAKE=$make if your $make command doesn't
 # do it for you.
 $make_set_make
@@ -492,7 +504,7 @@ mini_obj = $(minindt_obj) $(MINIDTRACE_O)
 ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
 obj = $(ndt_obj) $(DTRACE_O)
 
-perltoc_pod_prereqs = extra.pods pod/perl5232delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
+perltoc_pod_prereqs = extra.pods pod/perl5238delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
 generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
 generated_headers = uudmap.h bitcount.h mg_data.h
 
@@ -697,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)
@@ -709,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:
@@ -873,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)
@@ -941,6 +979,12 @@ $(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPOR
 !NO!SUBS!
 
         case $osname in
+       # In AmigaOS the Perl executable needs to be linked with -ldl,
+       # but none of the other executables should be.
+        amigaos) $spitshell >>$Makefile <<'!NO!SUBS!'
+       $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs) -ldl
+!NO!SUBS!
+        ;;
         os390) $spitshell >>$Makefile <<'!NO!SUBS!'
        $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs)
 !NO!SUBS!
@@ -1020,9 +1064,9 @@ pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
 pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
        $(MINIPERL) pod/perlmodlib.PL -q
 
-pod/perl5232delta.pod: pod/perldelta.pod
-       $(RMS) pod/perl5232delta.pod
-       $(LNS) perldelta.pod pod/perl5232delta.pod
+pod/perl5238delta.pod: pod/perldelta.pod
+       $(RMS) pod/perl5238delta.pod
+       $(LNS) perldelta.pod pod/perl5238delta.pod
 
 extra.pods: $(MINIPERL_EXE)
        -@test ! -f extra.pods || rm -f `cat extra.pods`
@@ -1342,7 +1386,7 @@ _cleaner2:
        -rmdir lib/CPAN/Kwalify lib/CPAN/HTTP lib/CPAN/FTP lib/CPAN/Exception
        -rmdir lib/CPAN/API lib/CPAN lib/Attribute lib/Archive/Tar lib/Archive
        -rmdir lib/App/Prove/State/Result lib/App/Prove/State lib/App/Prove
-       -rmdir lib/App
+       -rmdir lib/App lib/Amiga
 
 _realcleaner:
        @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=distclean
@@ -1514,18 +1558,23 @@ esac
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-# Can't depend on lib/Config.pm because that might be where miniperl
+# minitest can't depend on lib/Config.pm because that might be where miniperl
 # is crashing.
-minitest: $(MINIPERL_EXE)
+minitest_prep:
        -@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
        @echo " "
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm, or the Unicode data files."
        @echo " "
-       - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
-               && $(RUN_PERL) TEST base/*.t comp/*.t cmd/*.t run/*.t \
-               io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t \
-               </dev/tty
+       - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
+
+MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t
+
+minitest: $(MINIPERL_EXE) minitest_prep
+       - cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
+
+minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
+       - cd t && PERL_SKIP_TTY_TEST=1 $(RUN_PERL) TEST $(MINITEST_TESTS)
 
 # Test via harness
 
@@ -1589,6 +1638,9 @@ distcheck: FORCE
 
 .PHONY: ctags
 
+TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+       etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+
 ctags:
        ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h