home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / Perl5 / Makefile < prev    next >
Encoding:
Makefile  |  1995-11-29  |  12.5 KB  |  375 lines  |  [TEXT/MPS ]

  1. #######################################################################
  2. #    Project    :    Perl 5
  3. #    File        :    Makefile            -    Build everything except examples
  4. #    Author    :    Matthias Neeracher
  5. #    Language    :    MPW Shell/Make
  6. #
  7. #  $Log: Makefile,v $
  8.  
  9. #
  10. # Tool options
  11. #
  12.  
  13. PerlSrc         = :
  14. PerlObj        = :Obj:
  15. bin             = "{MPW}LocalTools"
  16. privlib         = "{MPW}Libraries:PerlLibs"
  17. helpdir        = "{Boot}411"
  18. YACC             = yacc
  19.  
  20. COpt            =    -d macintosh -d MULTIPLICITY -d DEBUGGING -w off -sym on
  21. C68K            =    MWC68K {COpt} -mc68020 -model far
  22. CPPC            =    MWCPPC {COpt} -traceback
  23. ROptions     =     -i :
  24. Lib68K        =    MWLink68K -xm library -sym on
  25. LibPPC        =    MWLinkPPC -xm library -sym on
  26. LOpt            =     -sym on -w -xm mpwtool
  27. Link68K        =    MWLink68K {LOpt} -model far
  28. LinkPPC        =    MWLinkPPC {LOpt} 
  29.  
  30. LibFiles68K    =            "{MW68KLibraries}MacOS.Lib"                            ∂
  31.                             {PerlLib68K}                                                ∂
  32.                             "{MW68KLibraries}GUSIDispatch.Lib.68K"                ∂
  33.                             "{MW68KLibraries}GUSIMPW.Lib.68K"                    ∂
  34.                             "{MW68KLibraries}MPW_Runtime.o.lib"                    ∂
  35.                             "{MW68KLibraries}new MPW ANSI (4i/8d) C.68K.Lib"    ∂
  36.                             "{MW68KLibraries}MathLib68K (4i/8d).Lib"            ∂
  37.                             "{MW68KLibraries}GUSI.Lib.68K"                        ∂
  38.                             "{MW68KLibraries}CPlusPlus.lib"                        ∂
  39.                             "{MW68KLibraries}ToolLibs.o"                            ∂
  40.                             "{MW68KLibraries}PLStringFuncs.glue.lib"
  41. MoLibs68K        =        "{MW68KLibraries}db.Lib.68K"                            ∂
  42.                             "{MW68KLibraries}"XL.Lib.68K                            ∂
  43.                             "{MW68KLibraries}OSACompLib.o"
  44.  
  45. LibFilesPPC    =            "{MWPPCLibraries}GUSIMPW.Lib.PPC"                ∂
  46.                             "{MWPPCLibraries}GUSI.Lib.PPC"                    ∂
  47.                             {PerlLibPPC}                                            ∂
  48.                             "{MWPPCLibraries}MWStdCRuntime.Lib"                ∂
  49.                             "{MWPPCLibraries}InterfaceLib"                    ∂
  50.                             "{MWPPCLibraries}ANSI (NL) C++.PPC.Lib"        ∂
  51.                             "{MWPPCLibraries}ANSI (NL) C.PPC.Lib"            ∂
  52.                             "{MWPPCLibraries}StdCLib"                            ∂
  53.                             "{MWPPCLibraries}MathLib"                            ∂
  54.                             "{MWPPCLibraries}PPCToolLibs.o"
  55. MoLibsPPC        =        "{MWPPCLibraries}db.Lib.PPC"                        ∂
  56.                             "{MWPPCLibraries}"XL.Lib.PPC                        ∂
  57.                             "{MWPPCLibraries}"x80.o                                ∂
  58.                             "{MWPPCLibraries}AppleScriptLib"
  59.  
  60. Headers                =                                                             ∂
  61.     EXTERN.h         INTERN.h         XSUB.h             av.h                 ∂
  62.     config.h         cop.h             cv.h                 dosish.h            ∂
  63.     embed.h             form.h             gv.h                 handy.h             ∂
  64.     hv.h                 keywords.h         mg.h                 op.h                ∂
  65.     opcode.h         patchlevel.h     perl.h             perly.h             ∂
  66.     pp.h                 proto.h             regcomp.h        regexp.h         ∂
  67.     scope.h             sv.h                 unixish.h         util.h            ∂
  68.     macish.h            SubLaunch.h
  69.  
  70. Source                =                                                             ∂
  71.     av.c                 scope.c             op.c                 doop.c             ∂
  72.     doio.c             dump.c             hv.c                 mg.c                ∂
  73.     perl.c             perly.c             pp.c                 pp_hot.c         ∂
  74.     pp_ctl.c         pp_sys.c         regcomp.c         regexec.c        ∂
  75.     gv.c                 sv.c                 taint.c             toke.c             ∂
  76.     util.c             deb.c             run.c                miniperlmain.c    ∂
  77.     perlmain.c        missing.c        SubLaunch.c        SubLaunch.a    
  78.  
  79. Objects68K             =                                                                         ∂
  80.     {PerlObj}gv.c.68K.o        {PerlObj}toke.c.68K.o        {PerlObj}perly.c.68K.o        ∂
  81.     {PerlObj}op.c.68K.o        {PerlObj}regcomp.c.68K.o    {PerlObj}dump.c.68K.o        ∂
  82.     {PerlObj}util.c.68K.o    {PerlObj}mg.c.68K.o            {PerlObj}hv.c.68K.o            ∂
  83.     {PerlObj}av.c.68K.o        {PerlObj}run.c.68K.o            {PerlObj}pp_hot.c.68K.o        ∂
  84.     {PerlObj}sv.c.68K.o        {PerlObj}pp.c.68K.o            {PerlObj}scope.c.68K.o        ∂
  85.     {PerlObj}pp_ctl.c.68K.o    {PerlObj}pp_sys.c.68K.o        {PerlObj}doop.c.68K.o        ∂
  86.     {PerlObj}doio.c.68K.o    {PerlObj}regexec.c.68K.o    {PerlObj}taint.c.68K.o        ∂
  87.     {PerlObj}deb.c.68K.o     {PerlObj}macish.c.68K.o     {PerlObj}SubLaunch.c.68K.o
  88. LibObjects68K        =                                                                        ∂
  89.     {PerlObj}missing.c.o.68K    {PerlObj}icemalloc.c.o.68K    
  90.  
  91. ObjectsPPC             =                                                                         ∂
  92.     {PerlObj}gv.c.PPC.o        {PerlObj}toke.c.PPC.o        {PerlObj}perly.c.PPC.o        ∂
  93.     {PerlObj}op.c.PPC.o        {PerlObj}regcomp.c.PPC.o    {PerlObj}dump.c.PPC.o        ∂
  94.     {PerlObj}util.c.PPC.o    {PerlObj}mg.c.PPC.o            {PerlObj}hv.c.PPC.o            ∂
  95.     {PerlObj}av.c.PPC.o        {PerlObj}run.c.PPC.o            {PerlObj}pp_hot.c.PPC.o        ∂
  96.     {PerlObj}sv.c.PPC.o        {PerlObj}pp.c.PPC.o            {PerlObj}scope.c.PPC.o        ∂
  97.     {PerlObj}pp_ctl.c.PPC.o    {PerlObj}pp_sys.c.PPC.o        {PerlObj}doop.c.PPC.o        ∂
  98.     {PerlObj}doio.c.PPC.o    {PerlObj}regexec.c.PPC.o    {PerlObj}taint.c.PPC.o        ∂
  99.     {PerlObj}deb.c.PPC.o      {PerlObj}macish.c.PPC.o     {PerlObj}SubLaunch.c.PPC.o
  100. LibObjectsPPC        =                                                                        ∂
  101.     {PerlObj}missing.c.o.PPC    {PerlObj}icemalloc.c.o.PPC
  102.  
  103. PerlCore68K = :PLib:Perl.68K.Lib
  104. PerlCorePPC = :PLib:Perl.PPC.Lib
  105. PerlLib68K     = :PLib:PerlLib.68K.Lib
  106. PerlLibPPC     = :PLib:PerlLib.PPC.Lib
  107.  
  108. public                        =
  109. dynamic_ext                    =
  110. Static_Ext_AutoInit        =    MacPerl DynaLoader NDBM_File DB_File Socket Fcntl POSIX 
  111. More_Static_Ext            =    OSA XL
  112. Static_Ext_AutoInit_PPC    =    :ext:MacPerl:MacPerl.o.PPC :ext:DynaLoader:DynaLoader.o.PPC :ext:NDBM_File:NDBM_File.o.PPC :ext:DB_File:DB_File.o.PPC :ext:Socket:Socket.o.PPC :ext:Fcntl:Fcntl.o.PPC :ext:POSIX:POSIX.o.PPC 
  113. Static_Ext_AutoInit_68K    =    :ext:MacPerl:MacPerl.o.68K :ext:DynaLoader:DynaLoader.o.68K :ext:NDBM_File:NDBM_File.o.68K :ext:DB_File:DB_File.o.68K :ext:Socket:Socket.o.68K :ext:Fcntl:Fcntl.o.68K :ext:POSIX:POSIX.o.68K 
  114. Static_Ext_Inc                =    -i :ext:MacPerl: -i :ext:DynaLoader: -i :ext:NDBM_File: -i :ext:DB_File: -i :ext:Socket: -i :ext:Fcntl: -i :ext:POSIX:
  115.  
  116. {PerlObj}    ƒ    :
  117. :PLib:        ƒ    :
  118.  
  119. #
  120. # To maximally exploit the speed of the Metrowerks compilers, we employ a
  121. # trick: The majority of object files has the form .c.{ARCH}.o and is subject
  122. # to bulk compilation, while a few have the form .c.o.{ARCH} and are compiled
  123. # one by one.
  124. #
  125.  
  126. .c.68K.o        ƒ    .c
  127.     Set Echo 0
  128.     Set Src68K "{Src68K} {DepDir}{Default}.c"
  129. .c.PPC.o        ƒ    .c
  130.     Set Echo 0
  131.     Set SrcPPC "{SrcPPC} {DepDir}{Default}.c"
  132. .c.o.68K        ƒ    .c
  133.     {C68K} {DepDir}{Default}.c -o {TargDir}{Default}.c.o.68K
  134. .c.o.PPC        ƒ    .c
  135.     {CPPC} {DepDir}{Default}.c -o {TargDir}{Default}.c.o.PPC
  136.  
  137. # all            ƒ miniperl preplibrary {public} {dynamic_ext}
  138. #     Directory x2p
  139. #         Set OldEcho {Echo}
  140. #         Set Echo 0
  141. #         BuildProgram all
  142. #         Set Echo {OldEcho}
  143. #     Directory ::
  144. #     Directory pd
  145. #         Set OldEcho {Echo}
  146. #         Set Echo 0
  147. #         BuildProgram all
  148. #         Set Echo {OldEcho}
  149. #     Directory ::
  150.  
  151. all                        ƒ    miniperl perl preplibrary runperl.c
  152.  
  153. lib                        ƒ    {PerlLib68K} {PerlLibPPC} runperl.c
  154.     
  155. {PerlCore68K}            ƒ {Objects68K} {PerlObj}perl.c.68K.o
  156.     Set Echo 1
  157.     If "{Src68K}" != "" 
  158.         {C68K} -t -fatext {Src68K} -o {PerlObj}
  159.     End
  160.     {Lib68K} -o {PerlCore68K} {Objects68K} {PerlObj}perl.c.68K.o
  161. {PerlCorePPC}            ƒ {ObjectsPPC} {PerlObj}perl.c.PPC.o
  162.     Set Echo 1
  163.     If "{SrcPPC}" != "" 
  164.         {CPPC} -t -fatext {SrcPPC} -o {PerlObj}
  165.     End
  166.     {LibPPC} -o {PerlCorePPC} {ObjectsPPC} {PerlObj}perl.c.PPC.o
  167. {PerlLib68K}            ƒ {LibObjects68K}
  168.     Set Echo 1
  169.     If "{Src68K}" != "" 
  170.         {C68K} -t -fatext {Src68K} -o {PerlObj}
  171.     End
  172.     {Lib68K} -o {PerlLib68K} {LibObjects68K}
  173. {PerlLibPPC}            ƒ {LibObjectsPPC} 
  174.     Set Echo 1
  175.     If "{SrcPPC}" != "" 
  176.         {CPPC} -t -fatext {SrcPPC} -o {PerlObj}
  177.     End
  178.     {LibPPC} -o {PerlLibPPC} {LibObjectsPPC} 
  179.  
  180. UnPreload    ƒ    {PerlObj}UnPreload.c.o.68K
  181.     {Link68K} -o UnPreload {PerlObj}UnPreload.c.o.68K {LibFiles68K} 
  182.     
  183. miniperl.PPC    ƒƒ {PerlObj}miniperlmain.c.o.PPC {PerlLibPPC} {PerlCorePPC}
  184.     {LinkPPC} -o miniperl.PPC {PerlObj}miniperlmain.c.o.PPC {LibFilesPPC} {PerlCorePPC} 
  185. miniperl.PPC    ƒƒ Perl.r Perl.rsrc 
  186.     Rez -a -c 'MPS ' -t MPST -d APPNAME=∂"MiniPerlPPC∂" Perl.r -o miniperl.PPC
  187.     
  188. miniperl.68K    ƒƒ {PerlObj}miniperlmain.c.o.68K {PerlCore68K} {PerlLib68K}
  189.     {Link68K} -o miniperl.68K {PerlObj}miniperlmain.c.o.68K {LibFiles68K} {PerlCore68K}  
  190. miniperl.68K    ƒƒ Perl.r Perl.rsrc 
  191.     Rez -a -c 'MPS ' -t MPST Perl.r -o miniperl.68K
  192.  
  193. miniperl ƒ UnPreload miniperl.PPC miniperl.68K
  194.     Duplicate -y miniperl.PPC miniperl
  195.     Echo 'Include "miniperl.68K" '∂''CODE'∂'';Include "miniperl.68K" '∂''DATA'∂'';' ∂
  196.         | Rez -a -c 'MPS ' -t MPST -o miniperl
  197.     UnPreload miniperl
  198.     
  199. perlmain.c    ƒ    miniperlmain.c # {Static_Ext_Autoinit}
  200.     miniperl writemain {Static_Ext_Autoinit} {More_Static_Ext}>perlmain.c
  201.  
  202. runperl.c    ƒ    miniperlmain.c # {Static_Ext_Autoinit}
  203.     miniperl writemain -runperl {Static_Ext_Autoinit} {More_Static_Ext}>runperl.c
  204.  
  205. BuildExt        ƒ    PerlCore.PPC
  206.     For i in {Static_Ext_Autoinit} 
  207.         directory :ext:{i}
  208.         Set Echo 0
  209.         buildprogram all
  210.         directory :::
  211.         Set Echo 1
  212.     end
  213.     
  214. PerlCore.PPC ƒ {PerlObj}perlcore.c.o.PPC {PerlCorePPC}
  215.     MWLinkPPC -w -c cfrg -t shlb -xm sharedLibrary -sym on -name Perl    -f Perl.export ∂
  216.         {PerlObj}perlcore.c.o.PPC {PerlCorePPC} {LibFilesPPC} {MoLibsPPC} -o PerlCore.PPC
  217.     MergeFragment -n Perl -c PerlCore.PPC
  218.  
  219. {PerlObj}perlmain.c.o.PPC     ƒ    perlmain.c
  220. {PerlObj}perlmain.c.o.68K    ƒ    perlmain.c
  221.  
  222. perl.PPC    ƒƒ {PerlObj}perlmain.c.o.PPC {PerlCorePPC} {PerlLibPPC} BuildExt
  223.     {LinkPPC} -name Perl    -f Perl.export ∂
  224.         {PerlObj}perlmain.c.o.PPC   {Static_Ext_Autoinit_PPC}        ∂
  225.         {PerlCorePPC} {LibFilesPPC} {MoLibsPPC} -o perl.PPC
  226. perl.PPC    ƒƒ Perl.r Perl.rsrc 
  227.     Rez -a -c 'MPS ' -t MPST -d APPNAME=∂"Perl∂" Perl.r -o perl.PPC
  228.     
  229. perl.68K    ƒƒ {PerlObj}perlmain.c.o.68K {PerlCore68K} {PerlLib68K} BuildExt
  230.     {Link68K} -o perl.68K                                          ∂
  231.         {PerlObj}perlmain.c.o.68K {LibFiles68K} ∂
  232.         {Static_Ext_Autoinit_68K}            ∂
  233.         {MoLibs68K} {PerlCore68K} 
  234. perl.68K    ƒƒ Perl.r Perl.rsrc 
  235.     Rez -a -c 'MPS ' -t MPST Perl.r -o perl.68K
  236.  
  237. perl ƒ UnPreload perl.PPC perl.68K
  238.     Duplicate -y perl.PPC perl
  239.     Echo 'Include "perl.68K" '∂''CODE'∂'';Include "perl.68K" '∂''DATA'∂'';' ∂
  240.         | Rez -a -c 'MPS ' -t MPST -o perl
  241.     UnPreload perl
  242.  
  243. opcode.h    ƒ opcode.pl
  244.     perl opcode.pl
  245.  
  246. embed.h    ƒ    embed_h.pl global.sym interp.sym
  247.     perl embed_h.pl
  248.  
  249. preplibraryƒ miniperl :lib:Config.pm
  250.     :miniperl -I:lib                                                     ∂
  251.         -e 'use AutoSplit; autosplit_lib_modules(@ARGV)'     ∂
  252.         :lib:≈.pm :lib:≈:≈.pm
  253.         
  254. :lib:Config.pmƒ config.mac miniperl
  255.     :miniperl configpm
  256.  
  257. Distr ƒ Distribution
  258.  
  259. Distribution ƒ 
  260.     Distribute PerlTool.distr Mac_Perl_503r1m_tool.sit
  261.  
  262. # # I now supply perly.c with the kits, so the following section is
  263. # # commented out if you don't have byacc.
  264. # ${comment1}perly.c:     perly.y perly.c.diff
  265. # ${comment1}    @ echo 'Expect' 109 shift/reduce and 1 reduce/reduce conflict
  266. # ${comment1}    \$(BYACC) -d perly.y
  267. # ${comment1}    sh \$(shellflags) ./perly.fixer y.tab.c perly.c
  268. # ${comment1}    mv y.tab.h perly.h
  269. # ${comment1}    echo 'extern YYSTYPE yylval;' >>perly.h
  270. # # This version is used only if you do not have byacc.
  271. # ${comment2}perly.c:    perly.y
  272. # ${comment2}    touch perly.c
  273. # !GROK!THIS!
  274. # $spitshell >>Makefile <<'!NO!SUBS!'
  275. # # Extensions:
  276. # # Names added to $(dynamic_ext) or $(static_ext) will automatically
  277. # # get built.  There should ordinarily be no need to change any of 
  278. # # this part of makefile.
  279. # #
  280. # # The dummy dependency is a place holder in case $(dynamic_ext) or
  281. # # $(static_ext) is empty.
  282. # #
  283. # # DynaLoader may be needed for extensions that use Makefile.PL.
  284. # $(DYNALOADER):    miniperl preplibrary FORCE
  285. #     @sh ext/util/make_ext static $@
  286. # d_dummy $(dynamic_ext):    miniperl preplibrary $(DYNALOADER) FORCE
  287. #     @sh ext/util/make_ext dynamic $@
  288. # s_dummy $(static_ext):    miniperl preplibrary $(DYNALOADER) FORCE
  289. #     @sh ext/util/make_ext static $@
  290. # clean:
  291. #     rm -f *.o *.a all perl suidperl miniperl
  292. #     rm -f perlmain.c
  293. #     rm -f perl.exp ext.libs ext/util/extlibist
  294. #     -cd x2p; $(MAKE) clean
  295. #     -cd pod; $(MAKE) clean
  296. #     -@for x in ext/* ; do \
  297. #     if test -f $$x/Makefile; then \
  298. #     echo "    Making clean in $$x"; \
  299. #     cd $$x; $(MAKE) clean ; cd ../.. ; \
  300. #     fi ; \
  301. #     done
  302. # realclean: clean
  303. #     -cd x2p; $(MAKE) realclean
  304. #     -@for x in ext/* ; do \
  305. #     if test -f $$x/Makefile; then \
  306. #     echo "    Making realclean in $$x"; \
  307. #     cd $$x; $(MAKE) realclean ; cd ../.. ; \
  308. #     fi ; \
  309. #     done
  310. #     rm -f *.orig */*.orig *~ */*~ core t/core
  311. #     rm -rf $(addedbyconf)
  312. #     rm -f Makefile cflags makedepend makedir writemain
  313. #     rm -f config.h t/perl makefile makefile.old
  314. #     rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags
  315. #     rm -f lib/Config.pm
  316. #     rm -rf lib/auto
  317. #     rm -f h2ph h2ph.man c2ph pstruct
  318. #     rm -rf .config
  319. # # The following lint has practically everything turned on.  Unfortunately,
  320. # # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  321. # # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  322. # # for that spot.
  323. # lint: perly.c $(c)
  324. #     lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
  325. # makefile:    Makefile
  326. #     make depend
  327. # # When done, touch perlmain.c so that it doesn't get remade each time.
  328. # depend: makedepend
  329. #     - test -f perly.h || cp /dev/null perly.h
  330. #     ./makedepend
  331. #     - test -s perly.h || /bin/rm -f perly.h
  332. #     - test -s perlmain.c && touch perlmain.c
  333. #     cd x2p; $(MAKE) depend
  334. # test: miniperl perl preplibrary $(dynamic_ext)
  335. #     - cd t && chmod +x TEST */*.t
  336. #     - cd t && (rm -f perl; $(LNS) ../perl perl) && ./perl TEST </dev/tty
  337. # clist:    $(c)
  338. #     echo $(c) | tr ' ' '\012' >.clist
  339. # hlist:  $(h)
  340. #     echo $(h) | tr ' ' '\012' >.hlist
  341. # shlist: $(sh)
  342. #     echo $(sh) | tr ' ' '\012' >.shlist
  343. # # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  344. # # If this runs make out of memory, delete /usr/include lines.
  345. # !NO!SUBS!
  346. # $eunicefix Makefile
  347. # case `pwd` in
  348. # *SH)
  349. #     $rm -f ../Makefile
  350. #     ln Makefile ../Makefile
  351. #     ;;
  352. # esac
  353. # rm -f makefile
  354.