Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New directory layout lib/bin/perl5

binaries into bin/, libraries into lib/, perl libs into perl5/
rename frontend/parrot -> frontend/parrot_old, frontend/parrot2 -> frontend/parrot,
This way installed binaries have the same relaive paths to its libraries, which eases
installation and testing a lot. binaries get relocatable on platforms which support
relative loader paths, and can be copied as is.
This is also the normal way a typical project layout is organized.
  • Loading branch information...
commit 6653428aff0bd92863ce30a298cae6f805315a88 1 parent ca58bca
@rurban rurban authored
Showing with 803 additions and 897 deletions.
  1. +14 −47 .gitignore
  2. +1 −1  Configure.pl
  3. +128 −128 MANIFEST
  4. +28 −94 MANIFEST.SKIP
  5. +1 −1  config/auto/icu.pm
  6. +11 −11 config/auto/pmc.pm
  7. +2 −2 config/gen/config_pm.pm
  8. +1 −1  config/gen/core_pmcs.pm
  9. +11 −10 config/gen/makefiles/parrot_embed_pl.in
  10. +70 −71 config/gen/makefiles/root.in
  11. +9 −5 config/init/defaults.pm
  12. +5 −4 config/init/hints/cygwin.pm
  13. +5 −5 config/init/hints/darwin.pm
  14. 0  frontend/{parrot2 → parrot}/build.pir
  15. +88 −321 frontend/parrot/main.c
  16. 0  frontend/{parrot2 → parrot}/prt0.pir
  17. 0  frontend/{parrot2 → parrot}/prt0.winxed
  18. +321 −88 frontend/{parrot2 → parrot_old}/main.c
  19. +1 −1  include/parrot/enums.h
  20. 0  {lib → perl5}/File/Which.pm
  21. 0  {lib → perl5}/IO/CaptureOutput.pm
  22. 0  {lib → perl5}/Parrot/BuildUtil.pm
  23. +1 −1  {lib → perl5}/Parrot/Config.pm
  24. 0  {lib → perl5}/Parrot/Configure.pm
  25. +1 −1  {lib → perl5}/Parrot/Configure/Compiler.pm
  26. 0  {lib → perl5}/Parrot/Configure/Data.pm
  27. 0  {lib → perl5}/Parrot/Configure/Messages.pm
  28. +1 −1  {lib → perl5}/Parrot/Configure/Options.pm
  29. +1 −1  {lib → perl5}/Parrot/Configure/Options/Conf.pm
  30. +1 −1  {lib → perl5}/Parrot/Configure/Options/Conf/CLI.pm
  31. +1 −1  {lib → perl5}/Parrot/Configure/Options/Conf/File.pm
  32. 0  {lib → perl5}/Parrot/Configure/Options/Conf/Shared.pm
  33. 0  {lib → perl5}/Parrot/Configure/Options/Reconf.pm
  34. +1 −1  {lib → perl5}/Parrot/Configure/Options/Test.pm
  35. +1 −1  {lib → perl5}/Parrot/Configure/Options/Test/Prepare.pm
  36. 0  {lib → perl5}/Parrot/Configure/Step.pm
  37. 0  {lib → perl5}/Parrot/Configure/Step/List.pm
  38. 0  {lib → perl5}/Parrot/Configure/Step/Methods.pm
  39. +1 −1  {lib → perl5}/Parrot/Configure/Step/Test.pm
  40. +2 −2 {lib → perl5}/Parrot/Configure/Test.pm
  41. 0  {lib → perl5}/Parrot/Configure/Trace.pm
  42. +1 −1  {lib → perl5}/Parrot/Configure/Utils.pm
  43. +1 −1  {lib → perl5}/Parrot/Distribution.pm
  44. 0  {lib → perl5}/Parrot/Docs/Directory.pm
  45. 0  {lib → perl5}/Parrot/Docs/File.pm
  46. 0  {lib → perl5}/Parrot/Docs/Group.pm
  47. 0  {lib → perl5}/Parrot/Docs/HTMLPage.pm
  48. 0  {lib → perl5}/Parrot/Docs/Item.pm
  49. 0  {lib → perl5}/Parrot/Docs/POD2HTML.pm
  50. 0  {lib → perl5}/Parrot/Docs/PodToHtml.pm
  51. 0  {lib → perl5}/Parrot/Docs/Section.pm
  52. 0  {lib → perl5}/Parrot/Docs/Section/C.pm
  53. 0  {lib → perl5}/Parrot/Docs/Section/Compilers.pm
  54. 0  {lib → perl5}/Parrot/Docs/Section/Config.pm
  55. 0  {lib → perl5}/Parrot/Docs/Section/Developer.pm
  56. 0  {lib → perl5}/Parrot/Docs/Section/Examples.pm
  57. 0  {lib → perl5}/Parrot/Docs/Section/IMCC.pm
  58. 0  {lib → perl5}/Parrot/Docs/Section/Info.pm
  59. 0  {lib → perl5}/Parrot/Docs/Section/Libs.pm
  60. 0  {lib → perl5}/Parrot/Docs/Section/Ops.pm
  61. 0  {lib → perl5}/Parrot/Docs/Section/PCT_Tutorial.pm
  62. 0  {lib → perl5}/Parrot/Docs/Section/PDDs.pm
  63. 0  {lib → perl5}/Parrot/Docs/Section/PMCs.pm
  64. 0  {lib → perl5}/Parrot/Docs/Section/Parrot.pm
  65. 0  {lib → perl5}/Parrot/Docs/Section/Perl.pm
  66. 0  {lib → perl5}/Parrot/Docs/Section/Tests.pm
  67. 0  {lib → perl5}/Parrot/Docs/Section/Tools.pm
  68. 0  {lib → perl5}/Parrot/Docs/Text2HTML.pm
  69. +1 −1  {lib → perl5}/Parrot/Git.pm
  70. +1 −1  {lib → perl5}/Parrot/Git/Describe.pm
  71. 0  {lib → perl5}/Parrot/H2inc.pm
  72. 0  {lib → perl5}/Parrot/Harness/DefaultTests.pm
  73. 0  {lib → perl5}/Parrot/Harness/Options.pm
  74. 0  {lib → perl5}/Parrot/Harness/Smoke.pm
  75. 0  {lib → perl5}/Parrot/Harness/TestSets.pm
  76. +1 −1  {lib → perl5}/Parrot/Headerizer.pm
  77. 0  {lib → perl5}/Parrot/Headerizer/Functions.pm
  78. 0  {lib → perl5}/Parrot/IO/Directory.pm
  79. 0  {lib → perl5}/Parrot/IO/File.pm
  80. 0  {lib → perl5}/Parrot/IO/Path.pm
  81. 0  {lib → perl5}/Parrot/Install.pm
  82. +3 −3 {lib → perl5}/Parrot/Manifest.pm
  83. 0  {lib → perl5}/Parrot/Pmc2c/Dumper.pm
  84. 0  {lib → perl5}/Parrot/Pmc2c/Emitter.pm
  85. 0  {lib → perl5}/Parrot/Pmc2c/Library.pm
  86. 0  {lib → perl5}/Parrot/Pmc2c/Method.pm
  87. 0  {lib → perl5}/Parrot/Pmc2c/PCCMETHOD.pm
  88. 0  {lib → perl5}/Parrot/Pmc2c/PMC.pm
  89. 0  {lib → perl5}/Parrot/Pmc2c/PMC/Null.pm
  90. 0  {lib → perl5}/Parrot/Pmc2c/PMC/Object.pm
  91. 0  {lib → perl5}/Parrot/Pmc2c/PMC/PrintTree.pm
  92. 0  {lib → perl5}/Parrot/Pmc2c/PMC/Proxy.pm
  93. 0  {lib → perl5}/Parrot/Pmc2c/PMC/RO.pm
  94. 0  {lib → perl5}/Parrot/Pmc2c/PMC/default.pm
  95. 0  {lib → perl5}/Parrot/Pmc2c/Parser.pm
  96. 0  {lib → perl5}/Parrot/Pmc2c/Pmc2cMain.pm
  97. 0  {lib → perl5}/Parrot/Pmc2c/UtilFunctions.pm
  98. 0  {lib → perl5}/Parrot/Pmc2c/VTable.pm
  99. +1 −1  {lib → perl5}/Parrot/Revision.pm
  100. +1 −1  {lib → perl5}/Parrot/SHA1.pm
  101. +1 −1  {lib → perl5}/Parrot/SearchOps.pm
  102. +1 −1  {lib → perl5}/Parrot/Test.pm
  103. 0  {lib → perl5}/Parrot/Test/Harness.pm
  104. 0  {lib → perl5}/Parrot/Test/PGE.pm
  105. +1 −1  {lib → perl5}/Parrot/Test/Pod.pm
  106. 0  {lib → perl5}/Parrot/Test/Pod/Utils.pm
  107. 0  {lib → perl5}/Parrot/Test/Util.pm
  108. 0  {lib → perl5}/Parrot/Test/Util/Runloop.pm
  109. 0  {lib → perl5}/Parrot/Vtable.pm
  110. 0  {lib → perl5}/Perl/Critic/Policy/CodeLayout/ProhibitDuplicateCoda.pm
  111. 0  {lib → perl5}/Perl/Critic/Policy/CodeLayout/ProhibitTrailingWhitespace.pm
  112. 0  {lib → perl5}/Perl/Critic/Policy/CodeLayout/UseParrotCoda.pm
  113. 0  {lib → perl5}/Perl/Critic/Policy/TestingAndDebugging/MisplacedShebang.pm
  114. 0  {lib → perl5}/Perl/Critic/Policy/TestingAndDebugging/ProhibitShebangWarningsArg.pm
  115. 0  {lib → perl5}/Perl/Critic/Policy/TestingAndDebugging/RequirePortableShebang.pm
  116. 0  {lib → perl5}/Pod/Escapes.pm
  117. 0  {lib → perl5}/Pod/Simple.pm
  118. 0  {lib → perl5}/Pod/Simple.pod
  119. 0  {lib → perl5}/Pod/Simple/BlackBox.pm
  120. 0  {lib → perl5}/Pod/Simple/Checker.pm
  121. 0  {lib → perl5}/Pod/Simple/Debug.pm
  122. 0  {lib → perl5}/Pod/Simple/DumpAsText.pm
  123. 0  {lib → perl5}/Pod/Simple/DumpAsXML.pm
  124. 0  {lib → perl5}/Pod/Simple/HTML.pm
  125. 0  {lib → perl5}/Pod/Simple/HTMLBatch.pm
  126. 0  {lib → perl5}/Pod/Simple/HTMLLegacy.pm
  127. 0  {lib → perl5}/Pod/Simple/LinkSection.pm
  128. 0  {lib → perl5}/Pod/Simple/Methody.pm
  129. 0  {lib → perl5}/Pod/Simple/Progress.pm
  130. 0  {lib → perl5}/Pod/Simple/PullParser.pm
  131. 0  {lib → perl5}/Pod/Simple/PullParserEndToken.pm
  132. 0  {lib → perl5}/Pod/Simple/PullParserStartToken.pm
  133. 0  {lib → perl5}/Pod/Simple/PullParserTextToken.pm
  134. 0  {lib → perl5}/Pod/Simple/PullParserToken.pm
  135. 0  {lib → perl5}/Pod/Simple/RTF.pm
  136. 0  {lib → perl5}/Pod/Simple/Search.pm
  137. 0  {lib → perl5}/Pod/Simple/SimpleTree.pm
  138. 0  {lib → perl5}/Pod/Simple/Subclassing.pod
  139. 0  {lib → perl5}/Pod/Simple/Text.pm
  140. 0  {lib → perl5}/Pod/Simple/TextContent.pm
  141. 0  {lib → perl5}/Pod/Simple/TiedOutFH.pm
  142. 0  {lib → perl5}/Pod/Simple/Transcode.pm
  143. 0  {lib → perl5}/Pod/Simple/TranscodeDumb.pm
  144. 0  {lib → perl5}/Pod/Simple/TranscodeSmart.pm
  145. 0  {lib → perl5}/Pod/Simple/XHTML.pm
  146. 0  {lib → perl5}/Pod/Simple/XMLOutStream.pm
  147. 0  {lib → perl5}/README.pod
  148. +1 −1  t/codingstd/pod_description.t
  149. +1 −1  t/codingstd/pod_syntax.t
  150. +1 −1  t/codingstd/pod_todo.t
  151. +1 −1  t/compilers/imcc/syn/file.t
  152. +1 −1  t/configure/002-messages.t
  153. +1 −1  t/configure/003-steplist.t
  154. +1 −1  t/configure/004-configure.t
  155. +1 −1  t/configure/006-bad_step.t
  156. +1 −1  t/configure/017-revision_from_cache.t
  157. +1 −1  t/configure/018-revision_to_cache.t
  158. +1 −1  t/configure/019-version.t
  159. +1 −1  t/configure/025-options_test.t
  160. +1 −1  t/configure/026-options_test.t
  161. +1 −1  t/configure/027-option_or_data.t
  162. +1 −1  t/configure/028-option_or_data.t
  163. +1 −1  t/configure/029-option_or_data.t
  164. +1 −1  t/configure/031-base.t
  165. +1 −1  t/configure/032-data.t
  166. +1 −1  t/configure/038-run_single_step.t
  167. +1 −1  t/configure/044-slurp_file.t
  168. +1 −1  t/configure/045-generated_file_header.t
  169. +1 −1  t/configure/049-options_test_prepare.t
  170. +1 −1  t/configure/061-revision_from_cache.t
  171. +1 −1  t/configure/062-sha1.t
  172. +1 −1  t/configure/063-git_describe.t
  173. +1 −1  t/harness
  174. +1 −1  t/library/yaml_dumper.t
  175. +1 −1  t/perl/Parrot_Test.t
  176. +1 −1  t/pharness/01-default_tests.t
  177. +1 −1  t/pharness/02-get_test_prog_args.t
  178. +1 −1  t/pharness/03-handle_long_options.t
  179. +1 −1  t/pharness/04-Usage.t
  180. +1 −1  t/postconfigure/02-data_get_PConfig.t
  181. +1 −1  t/postconfigure/05-trace.t
  182. +1 −1  t/postconfigure/06-data_get_PConfig_Temp.t
  183. +1 −1  t/src/checkdepend.t
  184. +1 −1  t/src/threads_io.t
  185. +1 −1  t/steps/auto/opengl-01.t
  186. +1 −1  t/steps/auto/pcre-01.t
  187. +1 −1  t/steps/auto/platform-01.t
  188. +1 −1  t/steps/auto/readline-01.t
  189. +1 −1  t/steps/auto/readline-02.t
  190. +1 −1  t/steps/gen/config_h-01.t
  191. +1 −1  t/steps/gen/core_pmcs-01.t
  192. +1 −1  t/steps/gen/opengl-01.t
  193. +1 −1  t/steps/init/defaults-01.t
  194. +1 −1  t/steps/init/manifest-01.t
  195. +1 −1  t/tools/create_language.t
  196. +1 −1  t/tools/dev/headerizer/01_functions.t
  197. +1 −1  t/tools/dev/headerizer/02_methods.t
  198. +1 −1  t/tools/dev/pmctree.t
  199. +1 −1  t/tools/install/01-create_directories.t
  200. +1 −1  t/tools/install/02-install_files.t
  201. +1 −1  t/tools/install/03-lines_to_files.t
  202. +1 −1  t/tools/mk_language_shell.t
  203. +1 −1  t/tools/parrot_config.t
  204. +1 −1  t/tools/pbc_disassemble.t
  205. +1 −1  t/tools/pbc_dump.t
  206. +1 −1  tools/build/fixup_gen_file.pl
  207. +1 −1  tools/build/gen_version.pl
  208. +2 −2 tools/build/h2inc.pl
  209. +1 −1  tools/build/pbcversion_h.pl
  210. +1 −1  tools/build/vtable_extend.pl
  211. +1 −1  tools/build/vtable_h.pl
  212. +1 −1  tools/dev/create_language.pl
  213. +1 −1  tools/dev/dump_pbc.pl
  214. +1 −1  tools/dev/headerizer.pl
  215. +1 −1  tools/dev/install_dev_files.pl
  216. +1 −1  tools/dev/install_doc_files.pl
  217. +1 −1  tools/dev/install_files.pl
  218. +1 −1  tools/dev/mk_inno.pl
  219. +1 −1  tools/dev/mk_inno_language.pl
  220. +1 −1  tools/dev/mk_manifest_and_skip.pl
  221. +1 −1  tools/dev/pmctree.pl
  222. +1 −1  tools/dev/reconfigure.pl
  223. +1 −1  tools/dev/resubmit_smolder.pl
  224. +1 −1  tools/dev/search_ops.pl
  225. +1 −1  tools/dev/update_copyright.pl
  226. +1 −1  tools/docs/mk_chm.pl
  227. +1 −1  tools/docs/mk_html_docs.pl
  228. +1 −1  tools/release/parrot_github_release.pl
  229. +1 −1  tools/release/releasecheck.pl
View
61 .gitignore
@@ -50,45 +50,14 @@ cachegrind.out.*
/Makefile
/TAGS
/all_cstring.str
-/blib
+/bin
+/lib
/config_lib.pir
/cover_db
/generated_hello.pbc
/install_config.fpmc
-/installable*
-/libparrot.def
-/libparrot.dll
-/libparrot.dll.a
-/cygparrot*.dll
-/miniparrot
/myconfig
-/ops2c
-/ops2c.c
-/ops2c.pbc
-/ops2c.pir
-/parrot
-/parrot-nqp
-/parrot-nqp.c
-/parrot-nqp.pbc
-/parrot-prove
-/parrot-prove.*
-/parrot.ilk
-/parrot.iss
-/parrot.pdb
-/parrot_config
-/parrot_config.c
-/parrot_config.pbc
-/parrot_debugger
-/parrot_nci_thunk_gen
-/parrot_nci_thunk_gen.c
-/parrot_nci_thunk_gen.pbc
/parrot_old
-/pbc_disassemble
-/pbc_dump
-/pbc_info
-/pbc_merge
-/pbc_to_exe
-/pbc_to_exe.*
/perl6
/tags
/temp.file
@@ -205,18 +174,18 @@ cachegrind.out.*
/include/parrot/pbcversion.h
/include/parrot/vtable.h
/include/pmc/*.h
-/lib/DumbLink.pm
-/lib/Parrot/*.tmp
-/lib/Parrot/Jit.pm
-/lib/Parrot/Makefile
-/lib/Parrot/OpLib
-/lib/Parrot/PMC.pm
-/lib/Parrot/PakFile2.bs
-/lib/Parrot/PakFile2.c
-/lib/Parrot/blib
-/lib/Parrot/pm_to_blib
-/lib/Parrot/Config/Generated.pm
-/lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
+/perl5/DumbLink.pm
+/perl5/Parrot/*.tmp
+/perl5/Parrot/Jit.pm
+/perl5/Parrot/Makefile
+/perl5/Parrot/OpLib
+/perl5/Parrot/PMC.pm
+/perl5/Parrot/PakFile2.bs
+/perl5/Parrot/PakFile2.c
+/perl5/Parrot/blib
+/perl5/Parrot/pm_to_blib
+/perl5/Parrot/Config/Generated.pm
+/perl5/Parrot/Pmc2c/PCCMETHOD_BITS.pm
/runtime/parrot/dynext/*.bundle
/runtime/parrot/dynext/*.def
/runtime/parrot/dynext/*.dll
@@ -517,8 +486,6 @@ cachegrind.out.*
/src/string/encoding/*.gcda
/src/string/encoding/*.gcno
/src/string/encoding/*.gcov
-/winxed
-/winxed.*
# Local variables:
# mode: text
# buffer-read-only: t
View
2  Configure.pl
@@ -5,7 +5,7 @@
use 5.008;
use strict;
use warnings;
-use lib 'lib';
+use lib 'perl5';
use Parrot::Configure;
use Parrot::Configure::Options qw( process_options );
View
256 MANIFEST
@@ -961,135 +961,135 @@ include/parrot/thread.h [main]include
include/parrot/vtables.h [main]include
include/parrot/warnings.h [main]include
include/pmc/dummy [main]include
-lib/File/Which.pm [devel]lib
-lib/IO/CaptureOutput.pm []
-lib/Parrot/BuildUtil.pm [devel]lib
-lib/Parrot/Config.pm [devel]lib
-lib/Parrot/Configure.pm [devel]lib
-lib/Parrot/Configure/Compiler.pm [devel]lib
-lib/Parrot/Configure/Data.pm [devel]lib
-lib/Parrot/Configure/Messages.pm [devel]lib
-lib/Parrot/Configure/Options.pm [devel]lib
-lib/Parrot/Configure/Options/Conf.pm [devel]lib
-lib/Parrot/Configure/Options/Conf/CLI.pm [devel]lib
-lib/Parrot/Configure/Options/Conf/File.pm [devel]lib
-lib/Parrot/Configure/Options/Conf/Shared.pm [devel]lib
-lib/Parrot/Configure/Options/Reconf.pm [devel]lib
-lib/Parrot/Configure/Options/Test.pm [devel]lib
-lib/Parrot/Configure/Options/Test/Prepare.pm [devel]lib
-lib/Parrot/Configure/Step.pm [devel]lib
-lib/Parrot/Configure/Step/List.pm [devel]lib
-lib/Parrot/Configure/Step/Methods.pm [devel]lib
-lib/Parrot/Configure/Step/Test.pm [devel]lib
-lib/Parrot/Configure/Test.pm [devel]lib
-lib/Parrot/Configure/Trace.pm [devel]lib
-lib/Parrot/Configure/Utils.pm [devel]lib
-lib/Parrot/Distribution.pm [devel]lib
-lib/Parrot/Docs/Directory.pm [devel]lib
-lib/Parrot/Docs/File.pm [devel]lib
-lib/Parrot/Docs/Group.pm [devel]lib
-lib/Parrot/Docs/HTMLPage.pm [devel]lib
-lib/Parrot/Docs/Item.pm [devel]lib
-lib/Parrot/Docs/POD2HTML.pm [devel]lib
-lib/Parrot/Docs/PodToHtml.pm [devel]lib
-lib/Parrot/Docs/Section.pm [devel]lib
-lib/Parrot/Docs/Section/C.pm [devel]lib
-lib/Parrot/Docs/Section/Compilers.pm [devel]lib
-lib/Parrot/Docs/Section/Config.pm [devel]lib
-lib/Parrot/Docs/Section/Developer.pm [devel]lib
-lib/Parrot/Docs/Section/Examples.pm [devel]lib
-lib/Parrot/Docs/Section/IMCC.pm [devel]lib
-lib/Parrot/Docs/Section/Info.pm [devel]lib
-lib/Parrot/Docs/Section/Libs.pm [devel]lib
-lib/Parrot/Docs/Section/Ops.pm [devel]lib
-lib/Parrot/Docs/Section/PCT_Tutorial.pm [devel]lib
-lib/Parrot/Docs/Section/PDDs.pm [devel]lib
-lib/Parrot/Docs/Section/PMCs.pm [devel]lib
-lib/Parrot/Docs/Section/Parrot.pm [devel]lib
-lib/Parrot/Docs/Section/Perl.pm [devel]lib
-lib/Parrot/Docs/Section/Tests.pm [devel]lib
-lib/Parrot/Docs/Section/Tools.pm [devel]lib
-lib/Parrot/Docs/Text2HTML.pm [devel]lib
-lib/Parrot/Git.pm [devel]lib
-lib/Parrot/Git/Describe.pm [devel]lib
-lib/Parrot/H2inc.pm [devel]lib
-lib/Parrot/Harness/DefaultTests.pm [devel]lib
-lib/Parrot/Harness/Options.pm [devel]lib
-lib/Parrot/Harness/Smoke.pm [devel]lib
-lib/Parrot/Harness/TestSets.pm [devel]lib
-lib/Parrot/Headerizer.pm [devel]lib
-lib/Parrot/Headerizer/Functions.pm [devel]lib
-lib/Parrot/IO/Directory.pm [devel]lib
-lib/Parrot/IO/File.pm [devel]lib
-lib/Parrot/IO/Path.pm [devel]lib
-lib/Parrot/Install.pm [devel]lib
-lib/Parrot/Manifest.pm [devel]lib
-lib/Parrot/Pmc2c/Dumper.pm [devel]lib
-lib/Parrot/Pmc2c/Emitter.pm [devel]lib
-lib/Parrot/Pmc2c/Library.pm [devel]lib
-lib/Parrot/Pmc2c/Method.pm [devel]lib
-lib/Parrot/Pmc2c/PCCMETHOD.pm [devel]lib
-lib/Parrot/Pmc2c/PMC.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/Null.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/Object.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/PrintTree.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/Proxy.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/RO.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/default.pm [devel]lib
-lib/Parrot/Pmc2c/Parser.pm [devel]lib
-lib/Parrot/Pmc2c/Pmc2cMain.pm [devel]lib
-lib/Parrot/Pmc2c/UtilFunctions.pm [devel]lib
-lib/Parrot/Pmc2c/VTable.pm [devel]lib
-lib/Parrot/Revision.pm [devel]lib
-lib/Parrot/SHA1.pm [devel]lib
-lib/Parrot/SearchOps.pm [devel]lib
-lib/Parrot/Test.pm [devel]lib
-lib/Parrot/Test/Harness.pm [devel]lib
-lib/Parrot/Test/PGE.pm [devel]lib
-lib/Parrot/Test/Pod.pm [devel]lib
-lib/Parrot/Test/Pod/Utils.pm [devel]lib
-lib/Parrot/Test/Util.pm [devel]lib
-lib/Parrot/Test/Util/Runloop.pm [devel]lib
-lib/Parrot/Vtable.pm [devel]lib
-lib/Perl/Critic/Policy/CodeLayout/ProhibitDuplicateCoda.pm []
-lib/Perl/Critic/Policy/CodeLayout/ProhibitTrailingWhitespace.pm []
-lib/Perl/Critic/Policy/CodeLayout/UseParrotCoda.pm []
-lib/Perl/Critic/Policy/TestingAndDebugging/MisplacedShebang.pm []
-lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitShebangWarningsArg.pm []
-lib/Perl/Critic/Policy/TestingAndDebugging/RequirePortableShebang.pm []
-lib/Pod/Escapes.pm []
-lib/Pod/Simple.pm []
-lib/Pod/Simple.pod []
-lib/Pod/Simple/BlackBox.pm []
-lib/Pod/Simple/Checker.pm []
-lib/Pod/Simple/Debug.pm []
-lib/Pod/Simple/DumpAsText.pm []
-lib/Pod/Simple/DumpAsXML.pm []
-lib/Pod/Simple/HTML.pm []
-lib/Pod/Simple/HTMLBatch.pm []
-lib/Pod/Simple/HTMLLegacy.pm []
-lib/Pod/Simple/LinkSection.pm []
-lib/Pod/Simple/Methody.pm []
-lib/Pod/Simple/Progress.pm []
-lib/Pod/Simple/PullParser.pm []
-lib/Pod/Simple/PullParserEndToken.pm []
-lib/Pod/Simple/PullParserStartToken.pm []
-lib/Pod/Simple/PullParserTextToken.pm []
-lib/Pod/Simple/PullParserToken.pm []
-lib/Pod/Simple/RTF.pm []
-lib/Pod/Simple/Search.pm []
-lib/Pod/Simple/SimpleTree.pm []
-lib/Pod/Simple/Subclassing.pod []
-lib/Pod/Simple/Text.pm []
-lib/Pod/Simple/TextContent.pm []
-lib/Pod/Simple/TiedOutFH.pm []
-lib/Pod/Simple/Transcode.pm []
-lib/Pod/Simple/TranscodeDumb.pm []
-lib/Pod/Simple/TranscodeSmart.pm []
-lib/Pod/Simple/XHTML.pm []
-lib/Pod/Simple/XMLOutStream.pm []
-lib/README.pod []doc
parrotbug []
+perl5/File/Which.pm [devel]lib
+perl5/IO/CaptureOutput.pm []
+perl5/Parrot/BuildUtil.pm [devel]lib
+perl5/Parrot/Config.pm [devel]lib
+perl5/Parrot/Configure.pm [devel]lib
+perl5/Parrot/Configure/Compiler.pm [devel]lib
+perl5/Parrot/Configure/Data.pm [devel]lib
+perl5/Parrot/Configure/Messages.pm [devel]lib
+perl5/Parrot/Configure/Options.pm [devel]lib
+perl5/Parrot/Configure/Options/Conf.pm [devel]lib
+perl5/Parrot/Configure/Options/Conf/CLI.pm [devel]lib
+perl5/Parrot/Configure/Options/Conf/File.pm [devel]lib
+perl5/Parrot/Configure/Options/Conf/Shared.pm [devel]lib
+perl5/Parrot/Configure/Options/Reconf.pm [devel]lib
+perl5/Parrot/Configure/Options/Test.pm [devel]lib
+perl5/Parrot/Configure/Options/Test/Prepare.pm [devel]lib
+perl5/Parrot/Configure/Step.pm [devel]lib
+perl5/Parrot/Configure/Step/List.pm [devel]lib
+perl5/Parrot/Configure/Step/Methods.pm [devel]lib
+perl5/Parrot/Configure/Step/Test.pm [devel]lib
+perl5/Parrot/Configure/Test.pm [devel]lib
+perl5/Parrot/Configure/Trace.pm [devel]lib
+perl5/Parrot/Configure/Utils.pm [devel]lib
+perl5/Parrot/Distribution.pm [devel]lib
+perl5/Parrot/Docs/Directory.pm [devel]lib
+perl5/Parrot/Docs/File.pm [devel]lib
+perl5/Parrot/Docs/Group.pm [devel]lib
+perl5/Parrot/Docs/HTMLPage.pm [devel]lib
+perl5/Parrot/Docs/Item.pm [devel]lib
+perl5/Parrot/Docs/POD2HTML.pm [devel]lib
+perl5/Parrot/Docs/PodToHtml.pm [devel]lib
+perl5/Parrot/Docs/Section.pm [devel]lib
+perl5/Parrot/Docs/Section/C.pm [devel]lib
+perl5/Parrot/Docs/Section/Compilers.pm [devel]lib
+perl5/Parrot/Docs/Section/Config.pm [devel]lib
+perl5/Parrot/Docs/Section/Developer.pm [devel]lib
+perl5/Parrot/Docs/Section/Examples.pm [devel]lib
+perl5/Parrot/Docs/Section/IMCC.pm [devel]lib
+perl5/Parrot/Docs/Section/Info.pm [devel]lib
+perl5/Parrot/Docs/Section/Libs.pm [devel]lib
+perl5/Parrot/Docs/Section/Ops.pm [devel]lib
+perl5/Parrot/Docs/Section/PCT_Tutorial.pm [devel]lib
+perl5/Parrot/Docs/Section/PDDs.pm [devel]lib
+perl5/Parrot/Docs/Section/PMCs.pm [devel]lib
+perl5/Parrot/Docs/Section/Parrot.pm [devel]lib
+perl5/Parrot/Docs/Section/Perl.pm [devel]lib
+perl5/Parrot/Docs/Section/Tests.pm [devel]lib
+perl5/Parrot/Docs/Section/Tools.pm [devel]lib
+perl5/Parrot/Docs/Text2HTML.pm [devel]lib
+perl5/Parrot/Git.pm [devel]lib
+perl5/Parrot/Git/Describe.pm [devel]lib
+perl5/Parrot/H2inc.pm [devel]lib
+perl5/Parrot/Harness/DefaultTests.pm [devel]lib
+perl5/Parrot/Harness/Options.pm [devel]lib
+perl5/Parrot/Harness/Smoke.pm [devel]lib
+perl5/Parrot/Harness/TestSets.pm [devel]lib
+perl5/Parrot/Headerizer.pm [devel]lib
+perl5/Parrot/Headerizer/Functions.pm [devel]lib
+perl5/Parrot/IO/Directory.pm [devel]lib
+perl5/Parrot/IO/File.pm [devel]lib
+perl5/Parrot/IO/Path.pm [devel]lib
+perl5/Parrot/Install.pm [devel]lib
+perl5/Parrot/Manifest.pm [devel]lib
+perl5/Parrot/Pmc2c/Dumper.pm [devel]lib
+perl5/Parrot/Pmc2c/Emitter.pm [devel]lib
+perl5/Parrot/Pmc2c/Library.pm [devel]lib
+perl5/Parrot/Pmc2c/Method.pm [devel]lib
+perl5/Parrot/Pmc2c/PCCMETHOD.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/Null.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/Object.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/PrintTree.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/Proxy.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/RO.pm [devel]lib
+perl5/Parrot/Pmc2c/PMC/default.pm [devel]lib
+perl5/Parrot/Pmc2c/Parser.pm [devel]lib
+perl5/Parrot/Pmc2c/Pmc2cMain.pm [devel]lib
+perl5/Parrot/Pmc2c/UtilFunctions.pm [devel]lib
+perl5/Parrot/Pmc2c/VTable.pm [devel]lib
+perl5/Parrot/Revision.pm [devel]lib
+perl5/Parrot/SHA1.pm [devel]lib
+perl5/Parrot/SearchOps.pm [devel]lib
+perl5/Parrot/Test.pm [devel]lib
+perl5/Parrot/Test/Harness.pm [devel]lib
+perl5/Parrot/Test/PGE.pm [devel]lib
+perl5/Parrot/Test/Pod.pm [devel]lib
+perl5/Parrot/Test/Pod/Utils.pm [devel]lib
+perl5/Parrot/Test/Util.pm [devel]lib
+perl5/Parrot/Test/Util/Runloop.pm [devel]lib
+perl5/Parrot/Vtable.pm [devel]lib
+perl5/Perl/Critic/Policy/CodeLayout/ProhibitDuplicateCoda.pm []
+perl5/Perl/Critic/Policy/CodeLayout/ProhibitTrailingWhitespace.pm []
+perl5/Perl/Critic/Policy/CodeLayout/UseParrotCoda.pm []
+perl5/Perl/Critic/Policy/TestingAndDebugging/MisplacedShebang.pm []
+perl5/Perl/Critic/Policy/TestingAndDebugging/ProhibitShebangWarningsArg.pm []
+perl5/Perl/Critic/Policy/TestingAndDebugging/RequirePortableShebang.pm []
+perl5/Pod/Escapes.pm []
+perl5/Pod/Simple.pm []
+perl5/Pod/Simple.pod []
+perl5/Pod/Simple/BlackBox.pm []
+perl5/Pod/Simple/Checker.pm []
+perl5/Pod/Simple/Debug.pm []
+perl5/Pod/Simple/DumpAsText.pm []
+perl5/Pod/Simple/DumpAsXML.pm []
+perl5/Pod/Simple/HTML.pm []
+perl5/Pod/Simple/HTMLBatch.pm []
+perl5/Pod/Simple/HTMLLegacy.pm []
+perl5/Pod/Simple/LinkSection.pm []
+perl5/Pod/Simple/Methody.pm []
+perl5/Pod/Simple/Progress.pm []
+perl5/Pod/Simple/PullParser.pm []
+perl5/Pod/Simple/PullParserEndToken.pm []
+perl5/Pod/Simple/PullParserStartToken.pm []
+perl5/Pod/Simple/PullParserTextToken.pm []
+perl5/Pod/Simple/PullParserToken.pm []
+perl5/Pod/Simple/RTF.pm []
+perl5/Pod/Simple/Search.pm []
+perl5/Pod/Simple/SimpleTree.pm []
+perl5/Pod/Simple/Subclassing.pod []
+perl5/Pod/Simple/Text.pm []
+perl5/Pod/Simple/TextContent.pm []
+perl5/Pod/Simple/TiedOutFH.pm []
+perl5/Pod/Simple/Transcode.pm []
+perl5/Pod/Simple/TranscodeDumb.pm []
+perl5/Pod/Simple/TranscodeSmart.pm []
+perl5/Pod/Simple/XHTML.pm []
+perl5/Pod/Simple/XMLOutStream.pm []
+perl5/README.pod []doc
runtime/README.pod []doc
runtime/parrot/bin/prove.pir [library]
runtime/parrot/dynext/README.pod []doc
View
122 MANIFEST.SKIP
@@ -96,8 +96,8 @@
^/\\..*sw?/
^/all_cstring\.str$
^/all_cstring\.str/
-^/blib$
-^/blib/
+^/bin$
+^/bin/
^/compilers/data_json/data_json/.*\.pbc$
^/compilers/data_json/data_json/.*\.pbc/
^/compilers/data_json/data_json/.*\.pir$
@@ -158,8 +158,6 @@
^/core.*/
^/cover_db$
^/cover_db/
-^/cygparrot.*\.dll$
-^/cygparrot.*\.dll/
^/docs/.*\.tmp$
^/docs/.*\.tmp/
^/docs/Makefile$
@@ -344,96 +342,36 @@
^/include/pmc/.*\.h/
^/install_config\.fpmc$
^/install_config\.fpmc/
-^/installable.*$
-^/installable.*/
-^/lib/DumbLink\.pm$
-^/lib/DumbLink\.pm/
-^/lib/Parrot/.*\.tmp$
-^/lib/Parrot/.*\.tmp/
-^/lib/Parrot/Config/Generated\.pm$
-^/lib/Parrot/Config/Generated\.pm/
-^/lib/Parrot/Jit\.pm$
-^/lib/Parrot/Jit\.pm/
-^/lib/Parrot/Makefile$
-^/lib/Parrot/Makefile/
-^/lib/Parrot/OpLib$
-^/lib/Parrot/OpLib/
-^/lib/Parrot/PMC\.pm$
-^/lib/Parrot/PMC\.pm/
-^/lib/Parrot/PakFile2\.bs$
-^/lib/Parrot/PakFile2\.bs/
-^/lib/Parrot/PakFile2\.c$
-^/lib/Parrot/PakFile2\.c/
-^/lib/Parrot/Pmc2c/PCCMETHOD_BITS\.pm$
-^/lib/Parrot/Pmc2c/PCCMETHOD_BITS\.pm/
-^/lib/Parrot/blib$
-^/lib/Parrot/blib/
-^/lib/Parrot/pm_to_blib$
-^/lib/Parrot/pm_to_blib/
-^/libparrot\.def$
-^/libparrot\.def/
-^/libparrot\.dll$
-^/libparrot\.dll/
-^/libparrot\.dll\.a$
-^/libparrot\.dll\.a/
-^/miniparrot$
-^/miniparrot/
+^/lib$
+^/lib/
^/myconfig$
^/myconfig/
-^/ops2c$
-^/ops2c/
-^/ops2c\.c$
-^/ops2c\.c/
-^/ops2c\.pbc$
-^/ops2c\.pbc/
-^/ops2c\.pir$
-^/ops2c\.pir/
-^/parrot$
-^/parrot/
-^/parrot-nqp$
-^/parrot-nqp/
-^/parrot-nqp\.c$
-^/parrot-nqp\.c/
-^/parrot-nqp\.pbc$
-^/parrot-nqp\.pbc/
-^/parrot-prove$
-^/parrot-prove/
-^/parrot-prove\..*$
-^/parrot-prove\..*/
-^/parrot\.ilk$
-^/parrot\.ilk/
-^/parrot\.iss$
-^/parrot\.iss/
-^/parrot\.pdb$
-^/parrot\.pdb/
-^/parrot_config$
-^/parrot_config/
-^/parrot_config\.c$
-^/parrot_config\.c/
-^/parrot_config\.pbc$
-^/parrot_config\.pbc/
-^/parrot_debugger$
-^/parrot_debugger/
-^/parrot_nci_thunk_gen$
-^/parrot_nci_thunk_gen/
-^/parrot_nci_thunk_gen\.c$
-^/parrot_nci_thunk_gen\.c/
-^/parrot_nci_thunk_gen\.pbc$
-^/parrot_nci_thunk_gen\.pbc/
^/parrot_old$
^/parrot_old/
-^/pbc_disassemble$
-^/pbc_disassemble/
-^/pbc_dump$
-^/pbc_dump/
-^/pbc_info$
-^/pbc_info/
-^/pbc_merge$
-^/pbc_merge/
-^/pbc_to_exe$
-^/pbc_to_exe/
-^/pbc_to_exe\..*$
-^/pbc_to_exe\..*/
+^/perl5/DumbLink\.pm$
+^/perl5/DumbLink\.pm/
+^/perl5/Parrot/.*\.tmp$
+^/perl5/Parrot/.*\.tmp/
+^/perl5/Parrot/Config/Generated\.pm$
+^/perl5/Parrot/Config/Generated\.pm/
+^/perl5/Parrot/Jit\.pm$
+^/perl5/Parrot/Jit\.pm/
+^/perl5/Parrot/Makefile$
+^/perl5/Parrot/Makefile/
+^/perl5/Parrot/OpLib$
+^/perl5/Parrot/OpLib/
+^/perl5/Parrot/PMC\.pm$
+^/perl5/Parrot/PMC\.pm/
+^/perl5/Parrot/PakFile2\.bs$
+^/perl5/Parrot/PakFile2\.bs/
+^/perl5/Parrot/PakFile2\.c$
+^/perl5/Parrot/PakFile2\.c/
+^/perl5/Parrot/Pmc2c/PCCMETHOD_BITS\.pm$
+^/perl5/Parrot/Pmc2c/PCCMETHOD_BITS\.pm/
+^/perl5/Parrot/blib$
+^/perl5/Parrot/blib/
+^/perl5/Parrot/pm_to_blib$
+^/perl5/Parrot/pm_to_blib/
^/perl6$
^/perl6/
^/ports$
@@ -1028,10 +966,6 @@
^/vc70\.pdb/
^/vtable\.dump$
^/vtable\.dump/
-^/winxed$
-^/winxed/
-^/winxed\..*$
-^/winxed\..*/
^cachegrind\.out\..*$
^cachegrind\.out\..*/
^callgrind\.out\..*$
View
2  config/auto/icu.pm
@@ -24,7 +24,7 @@ use base qw(Parrot::Configure::Step);
use Cwd qw(cwd);
use File::Basename;
-use lib qw( lib );
+use lib qw( perl5 );
use Parrot::Configure::Utils qw(capture_output);
View
22 config/auto/pmc.pm
@@ -55,17 +55,17 @@ E_NOTE
$TEMP_pmc_build .= <<END;
PMC2C_FILES = \\
- lib/Parrot/Pmc2c/Pmc2cMain.pm \\
- lib/Parrot/Pmc2c/Parser.pm \\
- lib/Parrot/Pmc2c/Dumper.pm \\
- lib/Parrot/Pmc2c/PMC.pm \\
- lib/Parrot/Pmc2c/Method.pm \\
- lib/Parrot/Pmc2c/PCCMETHOD.pm \\
- lib/Parrot/Pmc2c/Library.pm \\
- lib/Parrot/Pmc2c/UtilFunctions.pm \\
- lib/Parrot/Pmc2c/PMC/default.pm \\
- lib/Parrot/Pmc2c/PMC/Null.pm \\
- lib/Parrot/Pmc2c/PMC/RO.pm
+ perl5/Parrot/Pmc2c/Pmc2cMain.pm \\
+ perl5/Parrot/Pmc2c/Parser.pm \\
+ perl5/Parrot/Pmc2c/Dumper.pm \\
+ perl5/Parrot/Pmc2c/PMC.pm \\
+ perl5/Parrot/Pmc2c/Method.pm \\
+ perl5/Parrot/Pmc2c/PCCMETHOD.pm \\
+ perl5/Parrot/Pmc2c/Library.pm \\
+ perl5/Parrot/Pmc2c/UtilFunctions.pm \\
+ perl5/Parrot/Pmc2c/PMC/default.pm \\
+ perl5/Parrot/Pmc2c/PMC/Null.pm \\
+ perl5/Parrot/Pmc2c/PMC/RO.pm
END
View
4 config/gen/config_pm.pm
@@ -54,12 +54,12 @@ sub runstep {
open( my $IN, "<", $template )
or die "Can't open $template: $!";
- my $configdir = catdir(qw/lib Parrot Config/);
+ my $configdir = catdir(qw/perl5 Parrot Config/);
unless ( -d $configdir ) {
mkdir $configdir
or die "Can't create dir $configdir: $!";
}
- my $gen_pm = q{lib/Parrot/Config/Generated.pm};
+ my $gen_pm = q{perl5/Parrot/Config/Generated.pm};
$conf->append_configure_log($gen_pm);
open( my $OUT, ">", $gen_pm )
or die "Can't open $gen_pm: $!";
View
2  config/gen/core_pmcs.pm
@@ -152,7 +152,7 @@ END_C
sub generate_pm {
my ( $self, $conf ) = @_;
- my $file = "lib/Parrot/PMC.pm";
+ my $file = "perl5/Parrot/PMC.pm";
my @pmcs = split( qr/ /, $conf->data->get('pmc_names') );
$conf->append_configure_log($file);
View
21 config/gen/makefiles/parrot_embed_pl.in
@@ -9,13 +9,15 @@ use Config;
use File::Copy;
use ExtUtils::MakeMaker;
-copy( 'lib/Parrot/Embed.xs', 'Embed.xs' );
+copy( 'perl5/Parrot/Embed.xs', 'Embed.xs' );
# cross-platform commands and paths
my %config;
$config{CC} = '@cc@';
-$config{PARROTDIR} = '../..';
-$config{PARROT} = '..@slash@..@slash@parrot@exe@';
+$config{PARROTDIR} = '..@slash@..';
+$config{BINDIR} = $config{PARROTDIR}.'bin';
+$config{LIBDIR} = $config{PARROTDIR}.'lib';
+$config{PARROT} = $config{BINDIR}.'@slash@parrot@exe@';
$config{C_LIBS} = '@libs@';
$config{INCLUDE} = "$config{PARROTDIR}/include";
#UNLESS(win32):$config{ALL_PARROT_LIBS} = "@libparrot_linkflags@ $config{C_LIBS} @linkflags@";
@@ -23,21 +25,20 @@ $config{ABS_PARROTDIR} = Cwd::realpath(
File::Spec->rel2abs( $config{PARROTDIR} ) );
$config{LDDLFLAGS} = $Config{lddlflags};
-if ($config{CC} eq 'cl')
-{
- $config{LDDLFLAGS} .= qq| -libpath:"$config{ABS_PARROTDIR} "|
- . File::Spec->catfile( $config{ABS_PARROTDIR}, 'libparrot.lib' );
+if ($config{CC} eq 'cl') {
+ $config{LDDLFLAGS} .= qq| -libpath:"$config{ABS_PARROTDIR}\\lib "|
+ . File::Spec->catfile( $config{ABS_PARROTDIR}, 'lib\\libparrot.lib' );
}
WriteMakefile(
'NAME' => 'Parrot::Embed',
- 'VERSION_FROM' => 'lib/Parrot/Embed.pm',
+ 'VERSION_FROM' => 'perl5/Parrot/Embed.pm',
'PREREQ_PM' => { 'ExtUtils::CBuilder' => 0 },
#IF(win32): 'LIBS' => [ $config{C_LIBS} ],
#ELSE: 'LIBS' => [ $config{ALL_PARROT_LIBS} ],
#IF(win32): 'OBJECT' => q|@libparrot_linkflags@ Embed@o@|,
'INC' => "-I$config{INCLUDE}",
- 'PM' => { map { $_ => "blib/$_" } <lib/Parrot/*pm> },
+ 'PM' => { map { $_ => "blib/$_" } <perl5/Parrot/*pm> },
'clean' => { FILES => '*.xs t/greet.pbc' },
'LDDLFLAGS' => $config{LDDLFLAGS},
);
@@ -54,7 +55,7 @@ sub test
my $inherited = shift->SUPER::test(@_);
return $inherited unless $config{cc} eq 'cl';
- my $dynlib_path = "\tset PATH=%PATH%:$config{ABS_PARROTDIR}";
+ my $dynlib_path = "\tset PATH=%PATH%:$config{ABS_PARROTDIR}/bin";
$inherited =~ s{^(test.*ic ::.*)$}{$1\n$dynlib_path}mg;
return $inherited;
View
141 config/gen/makefiles/root.in
@@ -72,7 +72,6 @@ LIBRARY_DIR = runtime/parrot/library
# directories for frontend
FR_DIR = frontend
FRP_DIR = $(FR_DIR)/parrot
-FRPTWO_DIR = $(FR_DIR)/parrot2
###############################################################################
#
@@ -175,8 +174,8 @@ GEN_CONFIGS = \
$(INC_DIR)/core_pmcs.h \
src/exec_dep.c \
src/exec_dep.h \
- lib/Parrot/Config/Generated.pm \
- lib/Parrot/PMC.pm \
+ perl5/Parrot/Config/Generated.pm \
+ perl5/Parrot/PMC.pm \
$(RUN_INC_DIR)/config.fpmc \
$(LIBRARY_DIR)/config.pir \
#IF(has_opengl): src/glut_nci_thunks.nci \
@@ -219,7 +218,7 @@ GEN_PASM_INCLUDES = \
$(RUN_INC_DIR)/parrot_version.pir
GEN_PM_INCLUDES = \
- lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
+ perl5/Parrot/Pmc2c/PCCMETHOD_BITS.pm
CONFIGURE_GENERATED_FILES = \
$(GEN_CONFIGS) \
@@ -356,7 +355,7 @@ FLUID_FILES_2 = \
$(LIBRARY_DIR)/ProfTest/Want.pbc \
$(LIBRARY_DIR)/YAML/Tiny.pbc \
$(RUN_INC_DIR)/parrotlib.pbc \
- $(FRPTWO_DIR)/prt0.pbc*
+ $(FRP_DIR)/prt0.pbc*
###############################################################################
#
@@ -541,35 +540,35 @@ OPS_FILES = @ops@
###############################################################################
# Executables
-PARROT = .@slash@@test_prog@$(EXE)
-PARROTOLD = .@slash@parrot_old$(EXE)
-MINIPARROT = .@slash@miniparrot$(EXE)
-DIS = .@slash@pbc_disassemble$(EXE)
-PDUMP = .@slash@pbc_dump$(EXE)
-PBC_MERGE = .@slash@pbc_merge$(EXE)
-PDB = .@slash@parrot_debugger$(EXE)
-PBC_TO_EXE = .@slash@pbc_to_exe$(EXE)
-PARROT_CONFIG = .@slash@parrot_config$(EXE)
-NQP_RX = .@slash@parrot-nqp$(EXE)
-NCI_THUNK_GEN = .@slash@parrot_nci_thunk_gen$(EXE)
-PARROT_PROVE = .@slash@parrot-prove$(EXE)
-OPS2C = .@slash@ops2c$(EXE)
-WINXED = .@slash@winxed$(EXE)
+PARROT = bin@slash@@test_prog@$(EXE)
+PARROTOLD = bin@slash@parrot_old$(EXE)
+MINIPARROT = bin@slash@miniparrot$(EXE)
+DIS = bin@slash@pbc_disassemble$(EXE)
+PDUMP = bin@slash@pbc_dump$(EXE)
+PBC_MERGE = bin@slash@pbc_merge$(EXE)
+PDB = bin@slash@parrot_debugger$(EXE)
+PBC_TO_EXE = bin@slash@pbc_to_exe$(EXE)
+PARROT_CONFIG = bin@slash@parrot_config$(EXE)
+NQP_RX = bin@slash@parrot-nqp$(EXE)
+NCI_THUNK_GEN = bin@slash@parrot_nci_thunk_gen$(EXE)
+PARROT_PROVE = bin@slash@parrot-prove$(EXE)
+OPS2C = bin@slash@ops2c$(EXE)
+WINXED = bin@slash@winxed$(EXE)
# Installable executables
INSTALLABLELIBPARROT = @blib_dir@@slash@installable_@libparrot_shared@
-INSTALLABLEPARROT = .@slash@installable_parrot$(EXE)
-INSTALLABLEDIS = .@slash@installable_pbc_disassemble$(EXE)
-INSTALLABLEPDUMP = .@slash@installable_pbc_dump$(EXE)
-INSTALLABLEPBC_MERGE = .@slash@installable_pbc_merge$(EXE)
-INSTALLABLEPBCTOEXE = .@slash@installable_pbc_to_exe$(EXE)
-INSTALLABLEPDB = .@slash@installable_parrot_debugger$(EXE)
-INSTALLABLECONFIG = .@slash@installable_parrot_config$(EXE)
-INSTALLABLENQP = .@slash@installable_parrot-nqp$(EXE)
-INSTALLABLENCITHUNKGEN = .@slash@installable_parrot_nci_thunk_gen$(EXE)
-INSTALLABLEPARROT_PROVE = .@slash@installable_parrot-prove$(EXE)
-INSTALLABLEOPS2C = .@slash@installable_ops2c$(EXE)
-INSTALLABLEWINXED = .@slash@installable_winxed$(EXE)
+INSTALLABLEPARROT = bin@slash@installable_parrot$(EXE)
+INSTALLABLEDIS = bin@slash@installable_pbc_disassemble$(EXE)
+INSTALLABLEPDUMP = bin@slash@installable_pbc_dump$(EXE)
+INSTALLABLEPBC_MERGE = bin@slash@installable_pbc_merge$(EXE)
+INSTALLABLEPBCTOEXE = bin@slash@installable_pbc_to_exe$(EXE)
+INSTALLABLEPDB = bin@slash@installable_parrot_debugger$(EXE)
+INSTALLABLECONFIG = bin@slash@installable_parrot_config$(EXE)
+INSTALLABLENQP = bin@slash@installable_parrot-nqp$(EXE)
+INSTALLABLENCITHUNKGEN = bin@slash@installable_parrot_nci_thunk_gen$(EXE)
+INSTALLABLEPARROT_PROVE = bin@slash@installable_parrot-prove$(EXE)
+INSTALLABLEOPS2C = bin@slash@installable_ops2c$(EXE)
+INSTALLABLEWINXED = bin@slash@installable_winxed$(EXE)
# Libraries
LIBPARROT_STATIC = @blib_dir@/@libparrot_static@
@@ -579,7 +578,7 @@ LIBPARROT_STATIC = @blib_dir@/@libparrot_static@
# This line controls whether a static or shared library is built
# by Parrot's make. It is not useful otherwise (e.g., in
-# lib/Parrot/Config/Generated.pm or config_lib.pir).
+# perl5/Parrot/Config/Generated.pm or config_lib.pir).
LIBPARROT = @libparrot_for_makefile_only@
#IF(has_icu):ICU_SHARED = @icu_shared@
@@ -749,10 +748,10 @@ src/string/private_cstring.h : $(STR_FILES) $(BUILD_TOOLS_DIR)/c2str.pl
H2INC = $(BUILD_TOOLS_DIR)/h2inc.pl
# classes PMC build utils and rules
-PMC2C = $(PERL) -Ilib $(BUILD_TOOLS_DIR)/pmc2c.pl @no_lines_flag@
-PMC2CD = $(PERL) -Ilib $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
-PMC2CC = $(PERL) -Ilib $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
-PMC2CV = $(PERL) -Ilib $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
+PMC2C = $(PERL) -Iperl5 $(BUILD_TOOLS_DIR)/pmc2c.pl @no_lines_flag@
+PMC2CD = $(PERL) -Iperl5 $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
+PMC2CC = $(PERL) -Iperl5 $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
+PMC2CV = $(PERL) -Iperl5 $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
#.pmc.dump : # suffix rule (limited support)
# $(PMC2CD) $<
@@ -760,7 +759,7 @@ PMC2CV = $(PERL) -Ilib $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
#.pmc.c : # suffix rule (limited support)
# $(PMC2CC) $<
-vtable.dump : src/vtable.tbl lib/Parrot/Pmc2c/VTable.pm lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm $(PMC2C_FILES)
+vtable.dump : src/vtable.tbl perl5/Parrot/Pmc2c/VTable.pm perl5/Parrot/Pmc2c/PCCMETHOD_BITS.pm $(PMC2C_FILES)
$(PMC2CV)
# This is a listing of all targets meant to be called by users
@@ -896,20 +895,20 @@ $(RUN_INC_DIR)/config.fpmc : myconfig config_lib.pir \
$(MINIPARROT) -I$(RUN_INC_DIR) config_lib.pir > $@
-bootstrap-prt0: $(WINXED) $(FRPTWO_DIR)/prt0.winxed
- $(WINXED) --noan -c $(FRPTWO_DIR)/prt0.winxed
+bootstrap-prt0: $(WINXED) $(FRP_DIR)/prt0.winxed
+ $(WINXED) --noan -c $(FRP_DIR)/prt0.winxed
# Circular dependencies winxed.pbc <- parrot and more
-$(FRPTWO_DIR)/prt0.pir: $(FRPTWO_DIR)/prt0.winxed
+$(FRP_DIR)/prt0.pir: $(FRP_DIR)/prt0.winxed
@echo "$@ out of date. Need to call: make parrot bootstrap-prt0"
-$(FRPTWO_DIR)/prt0.pbc : $(FRPTWO_DIR)/prt0.pir $(MINIPARROT)
- $(MINIPARROT) -I$(RUN_INC_DIR) -o $(FRPTWO_DIR)/prt0.pbc $(FRPTWO_DIR)/prt0.pir
+$(FRP_DIR)/prt0.pbc : $(FRP_DIR)/prt0.pir $(MINIPARROT)
+ $(MINIPARROT) -I$(RUN_INC_DIR) -o $(FRP_DIR)/prt0.pbc $(FRP_DIR)/prt0.pir
-$(FRPTWO_DIR)/prt0.pbc.c : $(FRPTWO_DIR)/prt0.pbc $(FRPTWO_DIR)/build.pir $(MINIPARROT)
- $(MINIPARROT) $(FRPTWO_DIR)/build.pir $(FRPTWO_DIR)/prt0.pbc
+$(FRP_DIR)/prt0.pbc.c : $(FRP_DIR)/prt0.pbc $(FRP_DIR)/build.pir $(MINIPARROT)
+ $(MINIPARROT) $(FRP_DIR)/build.pir $(FRP_DIR)/prt0.pbc
-$(FRPTWO_DIR)/prt0.pbc$(O) : $(FRPTWO_DIR)/prt0.pbc.c \
+$(FRP_DIR)/prt0.pbc$(O) : $(FRP_DIR)/prt0.pbc.c \
$(INC_DIR)/feature.h \
$(INC_DIR)/core_types.h \
$(INC_DIR)/compiler.h \
@@ -918,18 +917,18 @@ $(FRPTWO_DIR)/prt0.pbc$(O) : $(FRPTWO_DIR)/prt0.pbc.c \
$(INC_DIR)/config.h \
$(INC_DIR)/pbcversion.h
-$(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/parrot_config$(O) src/longopt$(O) $(MINIPARROT)
- $(LINK) @ld_out@$@ \
- $(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
- $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
-#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#$(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+# src/parrot_config$(O) src/longopt$(O) $(MINIPARROT)
+# $(LINK) @ld_out@$@ \
+# $(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
+# $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
+##IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresourc#e:$@;1
-$(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+$(PARROT) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/parrot_config$(O) src/longopt$(O) \
- $(MINIPARROT) $(FRPTWO_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
+ $(MINIPARROT) $(FRP_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
$(LINK) @ld_out@$@ \
- $(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
+ $(FRP_DIR)/main$(O) $(FRP_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -969,12 +968,12 @@ $(MINIPARROT) : $(FRP_DIR)/main$(O) $(INC_DIR)/api.h $(INC_DIR)/longopt.h $(LIBP
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(cygwin and optimize):$(INSTALLABLEPARROT) : LINK += -s
-$(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+$(INSTALLABLEPARROT) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/install_config$(O) src/longopt$(O) \
- $(FRPTWO_DIR)/prt0.pbc$(O) $(PARROT)
+ $(FRP_DIR)/prt0.pbc$(O) $(PARROT)
$(LINK) @ld_out@$@ \
- $(FRPTWO_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
- $(FRPTWO_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(FRP_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
+ $(FRP_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(INC_DIR)/context.h : $(INC_PMC_DIR)/pmc_callcontext.h
@@ -1352,7 +1351,7 @@ $(RUN_INC_DIR)/iterator.pasm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
$(RUN_INC_DIR)/call_bits.pasm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
-lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm : $(INC_DIR)/enums.h $(H2INC)
+perl5/Parrot/Pmc2c/PCCMETHOD_BITS.pm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
$(RUN_INC_DIR)/libpaths.pasm : $(INC_DIR)/library.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/library.h $@
@@ -1401,7 +1400,7 @@ examples-clean:
# hello
hello: test_prep examples/pasm/hello$(EXE)
- .@slash@examples@slash@pasm@slash@hello$(EXE) "from your friendly makefile"
+ @slash@examples@slash@pasm@slash@hello$(EXE) "from your friendly makefile"
examples/pasm/hello.pbc: examples/pasm/hello.pasm
$(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm
@@ -1456,7 +1455,7 @@ src/library$(O) : $(PARROT_H_HEADERS) src/library.str src/library.c\
$(INC_DIR)/dynext.h
$(INC_DIR)/extend_vtable.h src/extend_vtable.c src/vtable.h : src/vtable.tbl \
- $(BUILD_TOOLS_DIR)/vtable_extend.pl lib/Parrot/Vtable.pm
+ $(BUILD_TOOLS_DIR)/vtable_extend.pl perl5/Parrot/Vtable.pm
$(PERL) $(BUILD_TOOLS_DIR)/vtable_extend.pl
src/key$(O) : $(PARROT_H_HEADERS) src/key.str src/key.c \
@@ -1695,7 +1694,7 @@ src/io/buffer$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/io/buffer.c \
src/gc/alloc_memory$(O) : $(PARROT_H_HEADERS) src/gc/alloc_memory.c
-$(FRPTWO_DIR)/main$(O) : \
+$(FRP_DIR)/main$(O) : \
$(INC_DIR)/api.h \
$(INC_DIR)/compiler.h \
$(INC_DIR)/config.h \
@@ -1705,7 +1704,7 @@ $(FRPTWO_DIR)/main$(O) : \
$(INC_DIR)/longopt.h \
$(INC_DIR)/pbcversion.h \
include/imcc/api.h \
- $(FRPTWO_DIR)/main.c
+ $(FRP_DIR)/main.c
$(FRP_DIR)/main$(O) : \
$(INC_DIR)/api.h \
@@ -2087,7 +2086,7 @@ src/ops/core_ops$(O) : src/ops/core_ops.c \
# $(CONFIGURE_GENERATED_FILES) : Configure.pl
# $(PERL) Configure.pl
-$(INC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl lib/Parrot/Vtable.pm
+$(INC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl perl5/Parrot/Vtable.pm
$(PERL) $(BUILD_TOOLS_DIR)/vtable_h.pl
###############################################################################
@@ -2414,7 +2413,7 @@ clean : \
$(RM_F) chartypes "*.s" "*~"
$(RM_F) $(FLUID_FILES_1)
$(RM_F) $(FLUID_FILES_2)
- $(RM_RF) lib/Parrot/OpLib
+ $(RM_RF) perl5/Parrot/OpLib
$(RM_RF) runtime/parrot/languages/data_json
$(RM_F) runtime/parrot/languages/JSON/JSON.pir
$(RM_F) $(NQP_CLEANUPS) $(PGE_CLEANUPS) $(TGE_CLEANUPS)
@@ -2457,7 +2456,7 @@ prog-clean :
$(DIS) $(FR_DIR)/pbc_disassemble/main$(O)
$(RM_F) \
$(FRP_DIR)/main$(O) \
- $(FRPTWO_DIR)/main$(O) \
+ $(FRP_DIR)/main$(O) \
parrot_old \
src/null_config$(O) \
src/parrot_config$(O) \
@@ -2617,7 +2616,7 @@ status :
patch :
git diff
-LINTABLE_CFILES = `echo $(FRPTWO_DIR)/main$(O) $(O_FILES) src/parrot_config$(O) | $(PERL) -pe @PQ@s/\.o/\.c/g@PQ@`
+LINTABLE_CFILES = `echo $(FRP_DIR)/main$(O) $(O_FILES) src/parrot_config$(O) | $(PERL) -pe @PQ@s/\.o/\.c/g@PQ@`
lint : sunlint
@@ -2854,7 +2853,7 @@ FULLCOVER_DIRS = \
src/runcore \
src/string \
src/string/encoding \
- $(FRPTWO_DIR) \
+ $(FRP_DIR) \
$(FR_DIR)/parrot_debugger \
$(FR_DIR)/pbc_dump \
$(FR_DIR)/pbc_merge \
@@ -2902,7 +2901,7 @@ COVER_DIRS = \
src/runcore \
src/string \
src/string/encoding \
- $(FRPTWO_DIR) \
+ $(FRP_DIR) \
$(FR_DIR)/parrot_debugger \
$(FR_DIR)/pbc_dump \
$(FR_DIR)/pbc_merge \
@@ -3207,7 +3206,7 @@ tags: tags.dummy
tags.dummy:
-CRITIC_FILES = 'lib/Parrot'
+CRITIC_FILES = 'perl5/Parrot'
perlcritic:
perlcritic --profile $(DEV_TOOLS_DIR)/perlcritic.conf $(CRITIC_FILES)
@@ -3227,7 +3226,7 @@ HEADERIZER_O_FILES = \
\
$(FR_DIR)/parrot_debugger/main$(O) \
\
- $(FRPTWO_DIR)/main$(O) \
+ $(FRP_DIR)/main$(O) \
\
$(FR_DIR)/pbc_disassemble/main$(O) \
\
View
14 config/init/defaults.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2011, Parrot Foundation.
+# Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -81,6 +81,10 @@ sub runstep {
$ccdlflags =~ s/\s*-Wl,-rpath,\S*//g if $conf->options->get('disable-rpath');
my $build_dir = abs_path($FindBin::Bin);
+ my $bindir = File::Spec->catfile('bin','xx');
+ $bindir =~ s/xx$//;
+ my $libdir = File::Spec->catfile('lib','xx');
+ $libdir =~ s/xx$//;
my $cc_option = $conf->options->get('cc');
# We need a Glossary somewhere!
@@ -174,11 +178,11 @@ sub runstep {
sym_import => '',
# Library build directory
- blib_dir => 'blib/lib',
+ blib_dir => 'lib',
# libparrot library names
- libparrot_static => 'libparrot' . $Config{_a},
- libparrot_shared => 'libparrot.' . $Config{so},
+ libparrot_static => $libdir.'libparrot' . $Config{_a},
+ libparrot_shared => $libdir.'libparrot.' . $Config{so},
# does the system know about static/dynamic linking?
has_static_linking => 1,
@@ -191,7 +195,7 @@ sub runstep {
libparrot_soname => '',
perl => $^X,
- test_prog => 'parrot',
+ test_prog => $bindir.'parrot',
# some utilities in Makefile
cat => '$(PERL) -MExtUtils::Command -e cat',
View
9 config/init/hints/cygwin.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, Parrot Foundation.
+# Copyright (C) 2005-2012, Parrot Foundation.
package init::hints::cygwin;
@@ -18,11 +18,12 @@ sub runstep {
my $build_dir = $conf->data->get('build_dir');
$build_dir =~ s/ /\\ /g;
+ $blibdir = "$build_dir/lib";
my $libdir = $conf->data->get('libdir');
$libdir =~ s/ /\\ /g;
my $libparrot_shared = $conf->data->get('libparrot_shared');
# force cyg prefix
- $libparrot_shared =~ s/^lib/cyg/g;
+ $libparrot_shared =~ s/{^lib/lib}{bin/cyg};
# force the dll versioning
my @parrot_version = Parrot::BuildUtil::parrot_version();
my $dllsuffix = join('.', @parrot_version);
@@ -49,9 +50,9 @@ sub runstep {
sym_export => '__declspec(dllexport)',
sym_import => '__declspec(dllimport)',
libparrot_shared => $libparrot_shared,
- libparrot_ldflags => '-L' . $build_dir . ' -lparrot',
+ libparrot_ldflags => '-L' . $blibdir . ' -lparrot',
inst_libparrot_ldflags => '-L' . $libdir . ' -lparrot',
- libparrot_linkflags => '-L' . $build_dir . ' -lparrot',
+ libparrot_linkflags => '-L' . $blibdir . ' -lparrot',
inst_libparrot_linkflags => '-L' . $libdir . ' -lparrot',
);
View
10 config/init/hints/darwin.pm
@@ -5,7 +5,7 @@ package init::hints::darwin;
use strict;
use warnings;
-use lib qw( lib );
+use lib qw( perl5 );
use base qw(Parrot::Configure::Step);
use Parrot::BuildUtil;
@@ -41,7 +41,7 @@ sub runstep {
my $deploy_target = _set_deployment_environment();
- my $lib_dir = $conf->data->get('build_dir') . "/blib/lib";
+ my $lib_dir = $conf->data->get('build_dir') . "/lib";
$flagsref->{ldflags} .= ' -L"' . $lib_dir . '"';
if ($deploy_target =~ /^10\.(5|6|7)$/) {
@@ -86,12 +86,12 @@ sub runstep {
# of the library.
parrot_is_shared => 1,
- libparrot_shared => "libparrot.$version$share_ext",
- libparrot_shared_alias => "libparrot$share_ext",
+ libparrot_shared => "lib/libparrot.$version$share_ext",
+ libparrot_shared_alias => "lib/libparrot$share_ext",
rpath => "-L",
libparrot_soname => "-install_name "
. '"'
- . '@executable_path/blib/lib/'
+ . '@executable_path/../lib/'
. "libparrot.$version$share_ext"
. '"'
);
View
0  frontend/parrot2/build.pir → frontend/parrot/build.pir
File renamed without changes
View
409 frontend/parrot/main.c
@@ -1,13 +1,14 @@
/*
+
Copyright (C) 2007-2012, Parrot Foundation.
=head1 NAME
-frontend/parrot/main.c - The PIR/PASM compiler frontend to libparrot
+frontend/parrot2/main.c - The alternate PIR/PASM compiler frontend to libparrot
=head1 DESCRIPTION
-Start Parrot
+Start Parrot, bootstrapping to PIR as early as possible.
=head2 Functions
@@ -27,15 +28,10 @@ Start Parrot
struct init_args_t {
const char *run_core_name;
- Parrot_String sourcefile;
- Parrot_String outfile;
Parrot_Int trace;
- Parrot_Int execute_packfile;
- Parrot_Int write_packfile;
- Parrot_Int have_pbc_file;
- Parrot_Int have_pasm_file;
Parrot_Int turn_gc_off;
- Parrot_Int preprocess_only;
+ const char ** argv;
+ int argc;
};
extern int Parrot_set_config_hash(Parrot_PMC interp_pmc);
@@ -45,7 +41,6 @@ extern int Parrot_set_config_hash(Parrot_PMC interp_pmc);
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void help(void);
static void help_debug(void);
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
@@ -62,27 +57,17 @@ PARROT_PURE_FUNCTION
static int is_float(ARGIN(const char *s))
__attribute__nonnull__(1);
-PARROT_CAN_RETURN_NULL
-static PMC * load_bytecode_file(Parrot_PMC interp, Parrot_String filename);
-
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static const struct longopt_opt_decl * Parrot_cmd_options(void);
-static void Parrot_version(void);
static void parseflags(
Parrot_PMC interp,
int argc,
ARGIN(const char *argv[]),
- ARGOUT(int *pgm_argc),
- ARGOUT(const char ***pgm_argv),
ARGMOD(struct init_args_t * args))
__attribute__nonnull__(3)
__attribute__nonnull__(4)
- __attribute__nonnull__(5)
- __attribute__nonnull__(6)
- FUNC_MODIFIES(*pgm_argc)
- FUNC_MODIFIES(*pgm_argv)
FUNC_MODIFIES(* args);
static void parseflags_minimal(
@@ -102,22 +87,13 @@ static void print_parrot_string(
FUNC_MODIFIES(*vector);
PARROT_CANNOT_RETURN_NULL
-static PMC * run_imcc(
- Parrot_PMC interp,
- Parrot_String sourcefile,
- ARGIN(struct init_args_t *flags))
- __attribute__nonnull__(3);
+static void setup_imcc(Parrot_PMC interp);
static void show_last_error_and_exit(Parrot_PMC interp);
static void usage(ARGMOD(FILE *fp))
__attribute__nonnull__(1)
FUNC_MODIFIES(*fp);
-static void verify_file_names(
- ARGIN_NULLOK(const char * input),
- ARGIN_NULLOK(const char * output));
-
-#define ASSERT_ARGS_help __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_help_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_is_all_digits __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
@@ -125,25 +101,19 @@ static void verify_file_names(
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_is_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
-#define ASSERT_ARGS_load_bytecode_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_cmd_options __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_version __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_parseflags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(argv) \
- , PARROT_ASSERT_ARG(pgm_argc) \
- , PARROT_ASSERT_ARG(pgm_argv) \
, PARROT_ASSERT_ARG(args))
#define ASSERT_ARGS_parseflags_minimal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(initargs) \
, PARROT_ASSERT_ARG(argv))
#define ASSERT_ARGS_print_parrot_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(vector))
-#define ASSERT_ARGS_run_imcc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(flags))
+#define ASSERT_ARGS_setup_imcc __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_show_last_error_and_exit __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_usage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(fp))
-#define ASSERT_ARGS_verify_file_names __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -160,18 +130,13 @@ The entry point from the command line into Parrot.
int
main(int argc, const char *argv[])
{
- Parrot_PMC interp;
- Parrot_PMC bytecodepmc;
- Parrot_PMC argsarray;
- int pir_argc;
- const char **pir_argv;
+ Parrot_PMC interp, bytecodepmc, args;
Parrot_Init_Args *initargs;
struct init_args_t parsed_flags;
- Parrot_String source_str;
- Parrot_String output_str;
GET_INIT_STRUCT(initargs);
+ initargs->numthreads = 0;
/* Parse minimal subset of flags */
parseflags_minimal(initargs, argc, argv);
@@ -190,42 +155,22 @@ main(int argc, const char *argv[])
}
/* Parse flags */
- parseflags(interp, argc, argv, &pir_argc, &pir_argv, &parsed_flags);
- source_str = parsed_flags.sourcefile;
- output_str = parsed_flags.outfile;
+ parseflags(interp, argc, argv, &parsed_flags);
if (!Parrot_api_set_runcore(interp, parsed_flags.run_core_name, parsed_flags.trace))
show_last_error_and_exit(interp);
- if (parsed_flags.execute_packfile) {
- if (!Parrot_api_pmc_wrap_string_array(interp, pir_argc, pir_argv, &argsarray))
- show_last_error_and_exit(interp);
- }
-
- if (parsed_flags.have_pbc_file) {
- bytecodepmc = load_bytecode_file(interp, source_str);
- if (parsed_flags.turn_gc_off)
- Parrot_api_toggle_gc(interp, 0);
- }
- else {
- Parrot_api_toggle_gc(interp, 0);
- bytecodepmc = run_imcc(interp, source_str, &parsed_flags);
- if (!parsed_flags.turn_gc_off)
- Parrot_api_toggle_gc(interp, 1);
- }
-
- /* -o outputs the file. -r outputs it and reads it in again from .pbc */
- if (parsed_flags.write_packfile) {
- if (!Parrot_api_write_bytecode_to_file(interp, bytecodepmc, output_str))
- show_last_error_and_exit(interp);
- if (parsed_flags.execute_packfile)
- bytecodepmc = load_bytecode_file(interp, output_str);
- }
+ Parrot_api_toggle_gc(interp, 0);
+ setup_imcc(interp);
+ if (!parsed_flags.turn_gc_off)
+ Parrot_api_toggle_gc(interp, 1);
- if (parsed_flags.execute_packfile) {
- if (!Parrot_api_run_bytecode(interp, bytecodepmc, argsarray))
- show_last_error_and_exit(interp);
- }
+ if (!(Parrot_api_pmc_wrap_string_array(interp, parsed_flags.argc, parsed_flags.argv,
+ &args)
+ && Parrot_api_load_bytecode_bytes(interp, get_program_code(), get_program_code_size(),
+ &bytecodepmc)
+ && Parrot_api_run_bytecode(interp, bytecodepmc, args)))
+ show_last_error_and_exit(interp);
/* Clean-up after ourselves */
Parrot_api_destroy_interpreter(interp);
@@ -234,8 +179,7 @@ main(int argc, const char *argv[])
/*
-=item C<static PMC * run_imcc(Parrot_PMC interp, Parrot_String sourcefile,
-struct init_args_t *flags)>
+=item C<static void setup_imcc(Parrot_PMC interp)>
Call into IMCC to either compile or preprocess the input.
@@ -244,61 +188,18 @@ Call into IMCC to either compile or preprocess the input.
*/
PARROT_CANNOT_RETURN_NULL
-static PMC *
-run_imcc(Parrot_PMC interp, Parrot_String sourcefile, ARGIN(struct init_args_t *flags))
+static void
+setup_imcc(Parrot_PMC interp)
{
- ASSERT_ARGS(run_imcc)
+ ASSERT_ARGS(setup_imcc)
Parrot_PMC pir_compiler = NULL;
Parrot_PMC pasm_compiler = NULL;;
if (!(imcc_get_pir_compreg_api(interp, 1, &pir_compiler) &&
imcc_get_pasm_compreg_api(interp, 1, &pasm_compiler)))
show_last_error_and_exit(interp);
- if (flags->preprocess_only) {
- Parrot_Int r = imcc_preprocess_file_api(interp, pir_compiler, sourcefile);
- exit(r ? EXIT_SUCCESS : EXIT_FAILURE);
- }
- else {
- const Parrot_Int pasm_mode = flags->have_pasm_file;
- const Parrot_PMC compiler = pasm_mode ? pasm_compiler : pir_compiler;
- Parrot_PMC pbc;
-
- if (!imcc_compile_file_api(interp, compiler, sourcefile, &pbc))
- show_last_error_and_exit(interp);
- return pbc;
- }
}
-/*
-
-=item C<static PMC * load_bytecode_file(Parrot_PMC interp, Parrot_String
-filename)>
-
-Load in a .pbc file to a PackFile PMC
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-static PMC *
-load_bytecode_file(Parrot_PMC interp, Parrot_String filename)
-{
- ASSERT_ARGS(load_bytecode_file)
- Parrot_PMC bytecode = NULL;
-
- /* set up all the compregs */
- Parrot_PMC pir_compiler;
- Parrot_PMC pasm_compiler;
-
- if (!(imcc_get_pir_compreg_api(interp, 1, &pir_compiler) &&
- imcc_get_pasm_compreg_api(interp, 1, &pasm_compiler)))
- show_last_error_and_exit(interp);
-
- if (!Parrot_api_load_bytecode_file(interp, filename, &bytecode))
- show_last_error_and_exit(interp);
- return bytecode;
-}
/*
@@ -318,15 +219,20 @@ show_last_error_and_exit(Parrot_PMC interp)
Parrot_Int exit_code, is_error;
Parrot_PMC exception;
- if (!Parrot_api_get_result(interp, &is_error, &exception, &exit_code, &errmsg))
+ if (!Parrot_api_get_result(interp, &is_error, &exception, &exit_code, &errmsg)) {
+ Parrot_api_destroy_interpreter(interp);
exit(EXIT_FAILURE);
+ }
if (is_error) {
- if (!Parrot_api_get_exception_backtrace(interp, exception, &backtrace))
+ if (!Parrot_api_get_exception_backtrace(interp, exception, &backtrace)) {
+ Parrot_api_destroy_interpreter(interp);
exit(EXIT_FAILURE);
+ }
print_parrot_string(interp, stderr, errmsg, 1);
print_parrot_string(interp, stderr, backtrace, 0);
}
+ Parrot_api_destroy_interpreter(interp);
exit(exit_code);
}
@@ -440,8 +346,8 @@ usage(ARGMOD(FILE *fp))
{
ASSERT_ARGS(usage)
fprintf(fp,
- "parrot -[acEGhrtvVwy.] [-d [FLAGS]] [-D [FLAGS]]"
- "[-O [level]] [-L path] [-R runcore] [-o FILE] <file>\n");
+ "parrot -[acEGhrtVwy.] [-D [FLAGS]]"
+ "[-R runcore] [-o FILE] <file>\n");
}
/*
@@ -460,19 +366,6 @@ help_debug(void)
ASSERT_ARGS(help_debug)
/* split printf for C89 compliance on string length */
printf(
- "--imcc-debug -d [Flags] ...\n"
- " 0002 lexer\n"
- " 0004 parser\n"
- " 0008 imc\n"
- " 0010 CFG\n"
- " 0020 optimization 1\n"
- " 0040 optimization 2\n"
- " 0100 AST\n"
- " 1000 PBC\n"
- " 2000 PBC constants\n"
- " 4000 PBC fixups\n"
- "\n");
- printf(
"--parrot-debug -D [Flags] ...\n"
" 0001 memory statistics\n"
" 0002 print backtrace on exception\n"
@@ -491,65 +384,6 @@ help_debug(void)
/*
-=item C<static void help(void)>
-
-Print out "help" list of options.
-
-=cut
-
-*/
-
-static void
-help(void)
-{
- ASSERT_ARGS(help)
- /* split printf for C89 compliance on string length */
- printf(
- "parrot [Options] <file>\n"
- " Options:\n"
- " -h --help\n"
- " -V --version\n"
- " -I --include add path to include search\n"
- " -L --library add path to library search\n"
- " --hash-seed F00F specify hex value to use as hash seed\n"
- " -X --dynext add path to dynamic extension search\n"
- " <Run core options>\n"
- " -R --runcore slow|bounds|fast\n"
- " -R --runcore trace|profiling|gcdebug\n"
- " -t --trace [flags]\n"
- " <VM options>\n"
- " -D --parrot-debug[=HEXFLAGS]\n"
- " --help-debug\n");
- printf(
- " -w --warnings\n"
- " -G --no-gc\n"
- " -g --gc ms2|gms|ms|inf set GC type\n"
- " <GC MS2 options>\n"
- " --gc-dynamic-threshold=percentage maximum memory wasted by GC\n"
- " --gc-min-threshold=KB\n"
- " <GC GMS options>\n"
- " --gc-nursery-size=percent of sysmem size of gen0 (default 2)\n"
- " --gc-debug\n"
- " --leak-test|--destroy-at-end\n"
- " -. --wait Read a keystroke before starting\n"
- " --runtime-prefix\n"
- " <Compiler options>\n"
- " -d --imcc-debug[=HEXFLAGS]\n"
- " -v --verbose\n"
- " -E --pre-process-only\n"
- " -o --output=FILE\n"
- " --output-pbc\n"
- " -O --optimize[=LEVEL]\n"
- " -a --pasm\n"
- " -c --pbc\n"
- " -r --run-pbc\n"
- " -y --yydebug\n"
- " <Language options>\n"
- "see docs/running.pod for more\n");
-}
-
-/*
-
=item C<static const struct longopt_opt_decl * Parrot_cmd_options(void)>
Set up the const struct declaration for cmd_options
@@ -576,13 +410,13 @@ Parrot_cmd_options(void)
{ '\0', OPT_HASH_SEED, OPTION_required_FLAG, { "--hash-seed" } },
{ 'I', 'I', OPTION_required_FLAG, { "--include" } },
{ 'L', 'L', OPTION_required_FLAG, { "--library" } },
- { 'O', 'O', OPTION_optional_FLAG, { "--optimize" } },
{ 'R', 'R', OPTION_required_FLAG, { "--runcore" } },
{ 'g', 'g', OPTION_required_FLAG, { "--gc" } },
{ '\0', OPT_GC_NURSERY_SIZE, OPTION_required_FLAG, { "--gc-nursery-size" } },
{ '\0', OPT_GC_DYNAMIC_THRESHOLD, OPTION_required_FLAG, { "--gc-dynamic-threshold" } },
{ '\0', OPT_GC_MIN_THRESHOLD, OPTION_required_FLAG, { "--gc-min-threshold" } },
{ '\0', OPT_GC_DEBUG, (OPTION_flags)0, { "--gc-debug" } },
+ { '\0', OPT_NUMTHREADS, OPTION_required_FLAG, { "--numthreads" } },
{ 'V', 'V', (OPTION_flags)0, { "--version" } },
{ 'X', 'X', OPTION_required_FLAG, { "--dynext" } },
{ '\0', OPT_DESTROY_FLAG, (OPTION_flags)0,
@@ -591,13 +425,11 @@ Parrot_cmd_options(void)
{ '\0', OPT_PBC_OUTPUT, (OPTION_flags)0, { "--output-pbc" } },
{ 'a', 'a', (OPTION_flags)0, { "--pasm" } },
{ 'c', 'c', (OPTION_flags)0, { "--pbc" } },
- { 'd', 'd', OPTION_optional_FLAG, { "--imcc-debug" } },
{ '\0', OPT_HELP_DEBUG, (OPTION_flags)0, { "--help-debug" } },
{ 'h', 'h', (OPTION_flags)0, { "--help" } },
{ 'r', 'r', (OPTION_flags)0, { "--run-pbc" } },
{ '\0', OPT_RUNTIME_PREFIX, (OPTION_flags)0, { "--runtime-prefix" } },
{ 't', 't', OPTION_optional_FLAG, { "--trace" } },
- { 'v', 'v', (OPTION_flags)0, { "--verbose" } },
{ 'w', 'w', (OPTION_flags)0, { "--warnings" } },
{ 'y', 'y', (OPTION_flags)0, { "--yydebug" } },
{ 0, 0, (OPTION_flags)0, { NULL } }
@@ -605,34 +437,6 @@ Parrot_cmd_options(void)
return cmd_options;
}
-
-/*
-
-=item C<static void Parrot_version(void)>
-
-Print out parrot version number.
-
-=cut
-
-*/
-
-static void
-Parrot_version(void)
-{
- ASSERT_ARGS(Parrot_version)
- printf("This is Parrot version " PARROT_VERSION);
- printf(" built for " PARROT_ARCHNAME ".\n");
- printf("Copyright (C) 2001-2012, Parrot Foundation.\n\
-\n\
-This code is distributed under the terms of the Artistic License 2.0.\
-\n\
-For more details, see the full text of the license in the LICENSE file\
-\n\
-included in the Parrot source tree.\n\n");
-
- exit(EXIT_SUCCESS);
-}
-
/*
=item C<static void parseflags_minimal(Parrot_Init_Args * initargs, int argc,
@@ -697,6 +501,22 @@ parseflags_minimal(ARGMOD(Parrot_Init_Args * initargs), int argc, ARGIN(const ch
}
break;
+ case OPT_NUMTHREADS:
+ if (opt.opt_arg && is_all_digits(opt.opt_arg)) {
+ initargs->numthreads = strtoul(opt.opt_arg, NULL, 8);
+
+ if (initargs->numthreads < 2 || initargs->numthreads > 1e8) {
+ fprintf(stderr, "error: minimum number of threads is 2\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+ else {
+ fprintf(stderr, "error: invalid number of threads specified:"
+ "'%s'\n", opt.opt_arg);
+ exit(EXIT_FAILURE);
+ }
+ break;
+
case OPT_HASH_SEED:
if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
initargs->hash_seed = strtoul(opt.opt_arg, NULL, 16);
@@ -716,7 +536,7 @@ parseflags_minimal(ARGMOD(Parrot_Init_Args * initargs), int argc, ARGIN(const ch
/*
=item C<static void parseflags(Parrot_PMC interp, int argc, const char *argv[],
-int *pgm_argc, const char ***pgm_argv, struct init_args_t * args)>
+struct init_args_t * args)>
Parse Parrot's command line for options and set appropriate flags.
@@ -726,32 +546,32 @@ Parse Parrot's command line for options and set appropriate flags.
static void
parseflags(Parrot_PMC interp, int argc, ARGIN(const char *argv[]),
- ARGOUT(int *pgm_argc), ARGOUT(const char ***pgm_argv),
ARGMOD(struct init_args_t * args))
{
ASSERT_ARGS(parseflags)
struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT;
- const char * outfile = NULL;
int status;
int result = 1;
- const char *sourcefile;
+ int nargs = 0;
+ int i;
- args->run_core_name = "fast";
- args->write_packfile = 0;
- args->execute_packfile = 1;
- args->have_pbc_file = 0;
- args->have_pasm_file = 0;
- args->trace = 0;
- args->turn_gc_off = 0;
- args->outfile = NULL;
- args->sourcefile = NULL;
- args->preprocess_only = 0;
+ /*
+ * Any option with an argument we handle may split an argument
+ * into two. So be pessimistic with the allocation.
+ */
+ int pargs_size = argc * 2;
+ const char **pargs = (const char**)calloc(pargs_size, sizeof (char*));
if (argc == 1) {
usage(stderr);
exit(EXIT_SUCCESS);
}
+ args->run_core_name = "fast";
+ args->trace = 0;
+ args->turn_gc_off = 0;
+ pargs[nargs++] = argv[0];
+
while ((status = longopt_get(argc, argv, Parrot_cmd_options(), &opt)) > 0) {
switch (opt.opt_id) {
case 'R':
@@ -790,8 +610,7 @@ parseflags(Parrot_PMC interp, int argc, ARGIN(const char *argv[]),
fgetc(stdin);
break;
case 'h':
- help();
- exit(EXIT_FAILURE);
+ pargs[nargs++] = "-h";
break;
case OPT_HASH_SEED:
/* handled in parseflags_minimal */
@@ -801,34 +620,21 @@ parseflags(Parrot_PMC interp, int argc, ARGIN(const char *argv[]),
exit(EXIT_FAILURE);
break;
case OPT_RUNTIME_PREFIX:
- {
- Parrot_String runtimepath;
- char * runtimepath_c;
- Parrot_api_get_runtime_path(interp, &runtimepath);
- Parrot_api_string_export_ascii(interp, runtimepath, &runtimepath_c);
- fprintf(stdout, "%s", runtimepath_c);
- Parrot_api_string_free_exported_ascii(interp, runtimepath_c);
- exit(EXIT_SUCCESS);
- }
+ pargs[nargs++] = "--runtime-prefix";
+ break;
case 'V':
- Parrot_version();
+ pargs[nargs++] = "-V";
break;
case OPT_PBC_OUTPUT:
case 'o':
- args->write_packfile = 1;
- args->execute_packfile = 0;
- outfile = opt.opt_arg;
- if (!Parrot_api_string_import(interp, opt.opt_arg, &args->outfile))
- show_last_error_and_exit(interp);
+ pargs[nargs++] = "-o";
+ pargs[nargs++] = opt.opt_arg;
break;
case 'r':
- args->write_packfile = 1;
- args->execute_packfile = 1;
- /* TODO: What else do we need to do for -r? We need to write the
- packfile out to a file first, then open and execute it? */
+ pargs[nargs++] = "-r";
break;
case 'c':
- args->have_pbc_file = 1;
+ pargs[nargs++] = "-c";
break;
case OPT_GC_DEBUG:
/*
@@ -845,6 +651,8 @@ parseflags(Parrot_PMC interp, int argc, ARGIN(const char *argv[]),
/* Parrot_api_flag(interp, PARROT_DESTROY_FLAG, 1); */
result = Parrot_api_flag(interp, 0x200, 1);
break;
+
+ /* TODO: Can we do these in prt0.pir? */
case 'I':
result = Parrot_api_add_include_search_path(interp, opt.opt_arg);
break;
@@ -858,81 +666,40 @@ parseflags(Parrot_PMC interp, int argc, ARGIN(const char *argv[]),
/* result = Parrot_api_set_warnings(interp, PARROT_WARNINGS_ALL_FLAG); */
result = Parrot_api_set_warnings(interp, 0xFFFF);
break;
+
case 'E':
- args->preprocess_only = 1;
+ pargs[nargs++] = "-E";
+ break;
default:
/* languages handle their arguments later (after being initialized) */
break;
}
+ if (!result) {
+ fprintf(stderr, "Parrot VM: Error parsing option %s\n", argv[opt.opt_index]);
+ usage(stderr);
+ exit(EXIT_FAILURE);
+ }
}
- if (!result) {
- fprintf(stderr, "Parrot VM: Error parsing option %s\n", argv[opt.opt_index]);
- usage(stderr);
- exit(EXIT_FAILURE);
- }
if (status == -1) {
fprintf(stderr, "%s\n", opt.opt_error);
usage(stderr);
exit(EXIT_FAILURE);
}
+ for (i = opt.opt_index; i < argc; i++)
+ pargs[nargs++] = argv[i];
- /* reached the end of the option list and consumed all of argv */
- if (argc == opt.opt_index) {
- /* We are not looking at an option, so it must be a program name */
- fprintf(stderr, "Missing program name\n");
- usage(stderr);
- exit(EXIT_FAILURE);
- }
-
- *pgm_argc = argc - opt.opt_index;
- *pgm_argv = argv + opt.opt_index;
-
- sourcefile = (*pgm_argv)[0];
- if (sourcefile) {
- const char * const ext = strrchr(sourcefile, '.');
- if (ext) {
- if (strcmp(ext, ".pbc") == 0)
- args->have_pbc_file = 1;
- else if (strcmp(ext, ".pasm") == 0)
- args->have_pasm_file = 1;
- }
- }
- verify_file_names(sourcefile, outfile);
- if (!Parrot_api_string_import(interp, sourcefile, &args->sourcefile))
- show_last_error_and_exit(interp);
-}
-
-/*
-
-=item C<static void verify_file_names(const char * input, const char * output)>
+ /* Make sure we don't overrun the end of the array */
+ PARROT_ASSERT(nargs <= pargs_size);
-Verify that the input and output filenames are sane and are not the same.
-
-=cut
-
-*/
-
-static void
-verify_file_names(ARGIN_NULLOK(const char * input), ARGIN_NULLOK(const char * output))
-{
- ASSERT_ARGS(verify_file_names)
- const char is_stdin = (input == NULL);
- const char is_stdout = (output == NULL);
- if (!is_stdin && !is_stdout && (strcmp(input, output)==0)) {
- fprintf(stderr, "Input and output files are the same");
- exit(EXIT_FAILURE);
- }
+ args->argv = pargs;
+ args->argc = nargs;
}
/*
=back
-=head1 SEE ALSO
-
-F<compilers/imcc/main.c>, unfortunately.
-
=cut
*/
View
0  frontend/parrot2/prt0.pir → frontend/parrot/prt0.pir
File renamed without changes
View
0  frontend/parrot2/prt0.winxed → frontend/parrot/prt0.winxed
File renamed without changes
View
409 frontend/parrot2/main.c → frontend/parrot_old/main.c
@@ -1,14 +1,13 @@
/*
-
Copyright (C) 2007-2012, Parrot Foundation.
=head1 NAME
-frontend/parrot2/main.c - The alternate PIR/PASM compiler frontend to libparrot
+frontend/parrot/main.c - The PIR/PASM compiler frontend to libparrot
=head1 DESCRIPTION
-Start Parrot, bootstrapping to PIR as early as possible.
+Start Parrot
=head2 Functions
@@ -28,10 +27,15 @@ Start Parrot, bootstrapping to PIR as early as possible.
struct init_args_t {
const char *run_core_name;
+ Parrot_String sourcefile;
+ Parrot_String outfile;
Parrot_Int trace;
+ Parrot_Int execute_packfile;
+ Parrot_Int write_packfile;
+ Parrot_Int have_pbc_file;
+ Parrot_Int have_pasm_file;
Parrot_Int turn_gc_off;
- const char ** argv;
- int argc;
+ Parrot_Int preprocess_only;
};
extern int Parrot_set_config_hash(Parrot_PMC interp_pmc);
@@ -41,6 +45,7 @@ extern int Parrot_set_config_hash(Parrot_PMC interp_pmc);
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+static void help(void);
static void help_debug(void);
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
@@ -57,17 +62,27 @@ PARROT_PURE_FUNCTION
static int is_float(ARGIN(const char *s))
__attribute__nonnull__(1);
+PARROT_CAN_RETURN_NULL
+static PMC * load_bytecode_file(Parrot_PMC interp, Parrot_String filename);
+
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static const struct longopt_opt_decl * Parrot_cmd_options(void);
+static void Parrot_version(void);
static void parseflags(
Parrot_PMC interp,
int argc,
ARGIN(const char *argv[]),
+ ARGOUT(int *pgm_argc),
+ ARGOUT(const char ***pgm_argv),
ARGMOD(struct init_args_t * args))
__attribute__nonnull__(3)
__attribute__nonnull__(4)
+ __attribute__nonnull__(5)
+ __attribute__nonnull__(6)
+ FUNC_MODIFIES(*pgm_argc)
+ FUNC_MODIFIES(*pgm_argv)
FUNC_MODIFIES(* args);
static void parseflags_minimal(
@@ -87,13 +102,22 @@ static void print_parrot_string(
FUNC_MODIFIES(*vector);
PARROT_CANNOT_RETURN_NULL
-static void setup_imcc(Parrot_PMC interp);
+static PMC * run_imcc(
+ Parrot_PMC interp,
+ Parrot_String sourcefile,
+ ARGIN(struct init_args_t *flags))
+ __attribute__nonnull__(3);
static void show_last_error_and_exit(Parrot_PMC interp);
static void usage(ARGMOD(FILE *fp))
__attribute__nonnull__(1)
FUNC_MODIFIES(*fp);
+static void verify_file_names(
+ ARGIN_NULLOK(const char * input),
+ ARGIN_NULLOK(const char * output));
+
+#define ASSERT_ARGS_help __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_help_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_is_all_digits __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
@@ -101,19 +125,25 @@ static void usage(ARGMOD(FILE *fp))
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_is_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_load_bytecode_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_cmd_options __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_version __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_parseflags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(argv) \
+ , PARROT_ASSERT_ARG(pgm_argc) \
+ , PARROT_ASSERT_ARG(pgm_argv) \
, PARROT_ASSERT_ARG(args))
#define ASSERT_ARGS_parseflags_minimal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(initargs) \
, PARROT_ASSERT_ARG(argv))
#define ASSERT_ARGS_print_parrot_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(vector))
-#define ASSERT_ARGS_setup_imcc __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_run_imcc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(flags))
#define ASSERT_ARGS_show_last_error_and_exit __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_usage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(fp))
+#define ASSERT_ARGS_verify_file_names __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -130,13 +160,18 @@ The entry point from the command line into Parrot.
int
main(int argc, const char *argv[])
{
- Parrot_PMC interp, bytecodepmc, args;
+ Parrot_PMC interp;
+ Parrot_PMC bytecodepmc;
+ Parrot_PMC argsarray;
+ int pir_argc;
+ const char **pir_argv;
Parrot_Init_Args *initargs;
struct init_args_t parsed_flags;
+ Parrot_String source_str;