redsnow 0.3.7 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +4 -4
- data/ext/drafter/Makefile +54 -0
- data/ext/drafter/appveyor.yml +10 -0
- data/ext/drafter/bin/drafter +0 -0
- data/ext/{snowcrash → drafter}/build/Makefile +29 -14
- data/ext/{snowcrash/build/snowcrash.Makefile → drafter/build/drafter.Makefile} +1 -1
- data/ext/{snowcrash/build/snowcrash.target.mk → drafter/build/drafter.target.mk} +25 -23
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/libmarkdownparser.target.mk +7 -7
- data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +152 -0
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/libsundown.target.mk +13 -13
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/perf-libsnowcrash.target.mk +14 -20
- data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
- data/ext/{snowcrash → drafter}/build/gyp-mac-tool +0 -0
- data/ext/{snowcrash/build/libsnowcrash.target.mk → drafter/build/libdrafter.target.mk} +29 -36
- data/ext/drafter/build/libsos.target.mk +133 -0
- data/ext/drafter/build/out/Release/drafter +0 -0
- data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
- data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
- data/ext/drafter/build/out/Release/libsos.a +0 -0
- data/ext/{snowcrash → drafter}/build/out/Release/libsundown.a +0 -0
- data/ext/{snowcrash → drafter}/build/out/Release/linker.lock +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/cdrafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/drafter/circle.yml +12 -0
- data/ext/{snowcrash → drafter}/config.gypi +1 -1
- data/ext/{snowcrash → drafter}/config.mk +0 -0
- data/ext/{snowcrash → drafter}/configure +16 -5
- data/ext/drafter/drafter.gyp +118 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/Makefile +4 -12
- data/ext/{snowcrash → drafter/ext/snowcrash}/Vagrantfile +14 -4
- data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/common.gypi +0 -0
- data/ext/drafter/ext/snowcrash/configure +197 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/Makefile +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/Makefile +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/Makefile.win +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/examples/smartypants.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/examples/sundown.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html_smartypants.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html_block_names.txt +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/html_blocks.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/stack.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/stack.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/sundown.def +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/markdown/markdown.vcproj +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/msvc.sln +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/sundown/sundown.vcproj +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/ByteBuffer.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/ByteBuffer.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownNode.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownNode.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownParser.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownParser.h +10 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/provisioning.sh +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/snowcrash.gyp +41 -39
- data/ext/{snowcrash → drafter/ext/snowcrash}/snowcrash.xcworkspace/contents.xcworkspacedata +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ActionParser.h +50 -6
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/AssetParser.h +1 -12
- data/ext/drafter/ext/snowcrash/src/AttributesParser.h +121 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Blueprint.h +169 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintParser.h +305 -48
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintSourcemap.h +130 -39
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintUtility.h +10 -4
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/CodeBlockUtility.h +1 -1
- data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +154 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HTTP.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HTTP.h +0 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +110 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HeadersParser.h +123 -54
- data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
- data/ext/drafter/ext/snowcrash/src/MSON.h +399 -0
- data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +95 -0
- data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +108 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
- data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +232 -0
- data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +91 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
- data/ext/drafter/ext/snowcrash/src/MSONUtility.h +423 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +179 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +346 -0
- data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ParameterParser.h +120 -61
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ParametersParser.h +17 -18
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/PayloadParser.h +36 -18
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Platform.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/RegexMatch.h +0 -0
- data/ext/drafter/ext/snowcrash/src/RelationParser.h +75 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ResourceGroupParser.h +127 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ResourceParser.h +126 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Section.cc +6 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Section.h +15 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionParser.h +3 -1
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionParserData.h +15 -5
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionProcessor.h +24 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Signature.cc +14 -0
- data/ext/drafter/ext/snowcrash/src/Signature.h +80 -0
- data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +439 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SourceAnnotation.h +3 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/StringUtility.h +103 -6
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/UriTemplateParser.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/UriTemplateParser.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ValuesParser.h +1 -13
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/posix/RegexMatch.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/snowcrash.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/snowcrash.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/win/RegexMatch.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/AUTHORS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/DEPS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/OWNERS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/PRESUBMIT.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/buildbot/buildbot_run.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/codereview.settings +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/data/win/large-pdb-shim.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp.bat +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp_main.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSNew.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSProject.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSSettings.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSToolFile.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSUserFile.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSUtil.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSVersion.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/__init__.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/common.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/easy_xml.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/flock_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/android.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/cmake.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/eclipse.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/gypd.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/gypsh.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/make.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/msvs.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/ninja.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/xcode.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/input.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/mac_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/msvs_emulation.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/ninja_syntax.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/ordered_dict.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/win_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcode_emulation.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcodeproj_file.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xml_fix.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylintrc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/samples/samples +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/samples/samples.bat +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/setup.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/emacs/gyp.el +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/graphviz.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_gyp.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_sln.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_vcproj.py +0 -0
- data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
- data/ext/drafter/ext/sos/Makefile +57 -0
- data/ext/drafter/ext/sos/src/sos.cc +200 -0
- data/ext/drafter/ext/sos/src/sos.h +179 -0
- data/ext/drafter/ext/sos/src/sosJSON.h +105 -0
- data/ext/drafter/ext/sos/src/sosYAML.h +104 -0
- data/ext/{snowcrash → drafter}/src/Serialize.cc +30 -15
- data/ext/drafter/src/Serialize.h +135 -0
- data/ext/drafter/src/SerializeAST.cc +775 -0
- data/ext/drafter/src/SerializeAST.h +19 -0
- data/ext/drafter/src/SerializeResult.cc +67 -0
- data/ext/drafter/src/SerializeResult.h +26 -0
- data/ext/drafter/src/SerializeSourcemap.cc +446 -0
- data/ext/drafter/src/SerializeSourcemap.h +19 -0
- data/ext/drafter/src/Version.h +38 -0
- data/ext/drafter/src/cdrafter.cc +44 -0
- data/ext/drafter/src/cdrafter.h +55 -0
- data/ext/drafter/src/config.cc +80 -0
- data/ext/drafter/src/config.h +35 -0
- data/ext/drafter/src/drafter.cc +22 -0
- data/ext/drafter/src/drafter.h +38 -0
- data/ext/drafter/src/main.cc +91 -0
- data/ext/drafter/src/reporting.cc +162 -0
- data/ext/drafter/src/reporting.h +28 -0
- data/ext/drafter/src/stream.h +146 -0
- data/ext/drafter/tools/homebrew/drafter.rb +12 -0
- data/ext/{snowcrash → drafter}/vcbuild.bat +3 -3
- data/lib/redsnow.rb +6 -11
- data/lib/redsnow/binding.rb +11 -201
- data/lib/redsnow/blueprint.rb +104 -169
- data/lib/redsnow/parseresult.rb +28 -42
- data/lib/redsnow/sourcemap.rb +92 -177
- data/lib/redsnow/version.rb +1 -1
- data/redsnow.gemspec +1 -1
- metadata +249 -197
- data/ext/snowcrash/bin/snowcrash +0 -0
- data/ext/snowcrash/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/snowcrash/build/out/Release/libsnowcrash.dylib +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CBlueprint.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CBlueprintSourcemap.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CSourceAnnotation.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/HTTP.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Section.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Serialize.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/SerializeJSON.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/SerializeYAML.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Signature.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/UriTemplateParser.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/csnowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/snowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/snowcrash/src/snowcrash/snowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/snowcrash +0 -0
- data/ext/snowcrash/src/CBlueprint.cc +0 -628
- data/ext/snowcrash/src/CBlueprint.h +0 -366
- data/ext/snowcrash/src/CBlueprintSourcemap.cc +0 -630
- data/ext/snowcrash/src/CBlueprintSourcemap.h +0 -351
- data/ext/snowcrash/src/CSourceAnnotation.cc +0 -154
- data/ext/snowcrash/src/CSourceAnnotation.h +0 -106
- data/ext/snowcrash/src/Serialize.h +0 -71
- data/ext/snowcrash/src/SerializeJSON.cc +0 -1221
- data/ext/snowcrash/src/SerializeJSON.h +0 -24
- data/ext/snowcrash/src/SerializeYAML.cc +0 -702
- data/ext/snowcrash/src/SerializeYAML.h +0 -24
- data/ext/snowcrash/src/Signature.h +0 -32
- data/ext/snowcrash/src/SymbolTable.h +0 -94
- data/ext/snowcrash/src/Version.h +0 -39
- data/ext/snowcrash/src/csnowcrash.cc +0 -29
- data/ext/snowcrash/src/csnowcrash.h +0 -40
- data/ext/snowcrash/src/snowcrash/snowcrash.cc +0 -200
- data/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/snowcrash/tools/homebrew/snowcrash.rb +0 -12
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
@@ -5,6 +5,17 @@
|
|
5
5
|
# This file uses parts of Node.js `configure`.
|
6
6
|
# Please refer to https://github.com/joyent/node.
|
7
7
|
#
|
8
|
+
import sys
|
9
|
+
|
10
|
+
|
11
|
+
if sys.version_info.major != 2:
|
12
|
+
# Since various Linux distros and OS X doesn't properly follow PEP 394,
|
13
|
+
# We've set the shebang line to `python` and erroring when it isn't
|
14
|
+
# Python 2.
|
15
|
+
print('{} requires Python 2, please install Python 2 and re-run this script.'.format(sys.argv[0]))
|
16
|
+
print('You may be able to do this with `python2 configure`.')
|
17
|
+
sys.exit()
|
18
|
+
|
8
19
|
import optparse
|
9
20
|
import os
|
10
21
|
import pprint
|
@@ -34,7 +45,7 @@ parser.add_option("--dest-cpu",
|
|
34
45
|
parser.add_option("--shared",
|
35
46
|
action="store_true",
|
36
47
|
dest="shared",
|
37
|
-
help="Build and use shared
|
48
|
+
help="Build and use shared libdrafter instead of static one.")
|
38
49
|
|
39
50
|
parser.add_option("-i", "--include-integration-tests",
|
40
51
|
action="store_true",
|
@@ -113,7 +124,7 @@ def host_arch_win():
|
|
113
124
|
|
114
125
|
return matchup.get(arch, 'ia32')
|
115
126
|
|
116
|
-
def
|
127
|
+
def configure_drafter(o):
|
117
128
|
# Build configuration
|
118
129
|
o['default_configuration'] = 'Debug' if options.debug else 'Release'
|
119
130
|
|
@@ -122,7 +133,7 @@ def configure_snowcrash(o):
|
|
122
133
|
target_arch = options.dest_cpu or host_arch
|
123
134
|
o['variables']['host_arch'] = host_arch
|
124
135
|
o['variables']['target_arch'] = target_arch
|
125
|
-
o['variables']['
|
136
|
+
o['variables']['libdrafter_type'] = 'shared_library' if options.shared else 'static_library'
|
126
137
|
|
127
138
|
#
|
128
139
|
# Cucumber testing environment
|
@@ -157,7 +168,7 @@ output = {
|
|
157
168
|
'cflags': [],
|
158
169
|
}
|
159
170
|
|
160
|
-
|
171
|
+
configure_drafter(output)
|
161
172
|
|
162
173
|
# variables should be a root level element,
|
163
174
|
# move everything else to target_defaults
|
@@ -207,7 +218,7 @@ else:
|
|
207
218
|
if os.path.exists(options_fn):
|
208
219
|
gyp_args.extend(['-I', options_fn])
|
209
220
|
|
210
|
-
subprocess.call([sys.executable, 'tools/gyp/gyp_main.py'] + gyp_args)
|
221
|
+
subprocess.call([sys.executable, 'ext/snowcrash/tools/gyp/gyp_main.py'] + gyp_args)
|
211
222
|
|
212
223
|
# All done
|
213
224
|
print("All OK.")
|
@@ -0,0 +1,118 @@
|
|
1
|
+
{
|
2
|
+
"includes": [
|
3
|
+
"ext/snowcrash/common.gypi"
|
4
|
+
],
|
5
|
+
|
6
|
+
"targets" : [
|
7
|
+
{
|
8
|
+
'target_name': 'libsos',
|
9
|
+
'type': 'static_library',
|
10
|
+
'include_dirs': [
|
11
|
+
'ext/sos/src'
|
12
|
+
],
|
13
|
+
'sources': [
|
14
|
+
'ext/sos/src/sos.cc',
|
15
|
+
'ext/sos/src/sos.h',
|
16
|
+
'ext/sos/src/sosJSON.h',
|
17
|
+
'ext/sos/src/sosYAML.h'
|
18
|
+
]
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"target_name": "libdrafter",
|
22
|
+
'type': '<(libdrafter_type)',
|
23
|
+
|
24
|
+
"sources": [
|
25
|
+
"src/drafter.h",
|
26
|
+
"src/drafter.cc",
|
27
|
+
"src/cdrafter.h",
|
28
|
+
"src/cdrafter.cc",
|
29
|
+
|
30
|
+
"src/stream.h",
|
31
|
+
"src/Version.h",
|
32
|
+
|
33
|
+
"src/Serialize.h",
|
34
|
+
"src/Serialize.cc",
|
35
|
+
"src/SerializeAST.h",
|
36
|
+
"src/SerializeAST.cc",
|
37
|
+
"src/SerializeSourcemap.h",
|
38
|
+
"src/SerializeSourcemap.cc",
|
39
|
+
"src/SerializeResult.h",
|
40
|
+
"src/SerializeResult.cc",
|
41
|
+
],
|
42
|
+
|
43
|
+
# FIXME: replace by direct dependecies
|
44
|
+
"include_dirs": [
|
45
|
+
"ext/snowcrash/ext/markdown-parser/src",
|
46
|
+
"ext/snowcrash/ext/markdown-parser/ext/sundown/src",
|
47
|
+
"ext/sos/src",
|
48
|
+
"ext/snowcrash/src",
|
49
|
+
],
|
50
|
+
|
51
|
+
"dependencies": [
|
52
|
+
"libsos",
|
53
|
+
"ext/snowcrash/snowcrash.gyp:libsnowcrash",
|
54
|
+
"ext/snowcrash/snowcrash.gyp:libmarkdownparser",
|
55
|
+
"ext/snowcrash/snowcrash.gyp:libsundown",
|
56
|
+
],
|
57
|
+
},
|
58
|
+
|
59
|
+
{
|
60
|
+
'target_name': 'test-libdrafter',
|
61
|
+
'type': 'executable',
|
62
|
+
'include_dirs': [
|
63
|
+
'src',
|
64
|
+
'test',
|
65
|
+
'test/vendor/Catch/include',
|
66
|
+
"ext/snowcrash/src",
|
67
|
+
"ext/snowcrash/ext/markdown-parser/src",
|
68
|
+
"ext/snowcrash/ext/markdown-parser/ext/sundown/src",
|
69
|
+
"ext/sos/src",
|
70
|
+
],
|
71
|
+
'sources': [
|
72
|
+
"test/test-main.cc",
|
73
|
+
"test/test-SerializeResult.cc",
|
74
|
+
"test/test-cdrafter.cc",
|
75
|
+
],
|
76
|
+
'dependencies': [
|
77
|
+
"libdrafter",
|
78
|
+
"libsos",
|
79
|
+
"ext/snowcrash/snowcrash.gyp:libsnowcrash",
|
80
|
+
"ext/snowcrash/snowcrash.gyp:libmarkdownparser",
|
81
|
+
"ext/snowcrash/snowcrash.gyp:libsundown",
|
82
|
+
],
|
83
|
+
'conditions': [
|
84
|
+
[ 'OS=="win"', { 'defines' : [ 'WIN' ] } ]
|
85
|
+
],
|
86
|
+
},
|
87
|
+
|
88
|
+
{
|
89
|
+
"target_name": "drafter",
|
90
|
+
"type": "executable",
|
91
|
+
"sources": [
|
92
|
+
"src/main.cc",
|
93
|
+
"src/config.cc",
|
94
|
+
"src/config.h",
|
95
|
+
"src/reporting.cc",
|
96
|
+
"src/reporting.h",
|
97
|
+
],
|
98
|
+
|
99
|
+
# FIXME: replace by direct dependecies
|
100
|
+
"include_dirs": [
|
101
|
+
"ext/cmdline",
|
102
|
+
"ext/snowcrash/ext/markdown-parser/src",
|
103
|
+
"ext/snowcrash/ext/markdown-parser/ext/sundown/src",
|
104
|
+
"ext/sos/src",
|
105
|
+
"ext/snowcrash/src",
|
106
|
+
],
|
107
|
+
|
108
|
+
"dependencies": [
|
109
|
+
"libdrafter",
|
110
|
+
"libsos",
|
111
|
+
"ext/snowcrash/snowcrash.gyp:libsnowcrash",
|
112
|
+
"ext/snowcrash/snowcrash.gyp:libmarkdownparser",
|
113
|
+
"ext/snowcrash/snowcrash.gyp:libsundown",
|
114
|
+
],
|
115
|
+
},
|
116
|
+
|
117
|
+
],
|
118
|
+
}
|
@@ -10,9 +10,9 @@ DESTDIR ?= /usr/local/bin
|
|
10
10
|
V ?= 1
|
11
11
|
|
12
12
|
# Targets
|
13
|
-
all: libsnowcrash test-libsnowcrash
|
13
|
+
all: libsnowcrash test-libsnowcrash
|
14
14
|
|
15
|
-
.PHONY: libsnowcrash test-libsnowcrash
|
15
|
+
.PHONY: libsnowcrash test-libsnowcrash
|
16
16
|
|
17
17
|
libsnowcrash: config.gypi $(BUILD_DIR)/Makefile
|
18
18
|
$(MAKE) -C $(BUILD_DIR) V=$(V) libsnowcrash
|
@@ -27,11 +27,6 @@ perf-libsnowcrash: config.gypi $(BUILD_DIR)/Makefile
|
|
27
27
|
mkdir -p ./bin
|
28
28
|
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/perf-libsnowcrash ./bin/perf-libsnowcrash
|
29
29
|
|
30
|
-
snowcrash: config.gypi $(BUILD_DIR)/Makefile
|
31
|
-
$(MAKE) -C $(BUILD_DIR) V=$(V) snowcrash
|
32
|
-
mkdir -p ./bin
|
33
|
-
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/snowcrash ./bin/snowcrash
|
34
|
-
|
35
30
|
config.gypi: configure
|
36
31
|
$(PYTHON) ./configure
|
37
32
|
|
@@ -48,7 +43,7 @@ distclean:
|
|
48
43
|
rm -f ./config.gypi
|
49
44
|
rm -rf ./bin
|
50
45
|
|
51
|
-
test: test-libsnowcrash
|
46
|
+
test: test-libsnowcrash
|
52
47
|
$(BUILD_DIR)/out/$(BUILDTYPE)/test-libsnowcrash
|
53
48
|
|
54
49
|
ifdef INTEGRATION_TESTS
|
@@ -58,7 +53,4 @@ endif
|
|
58
53
|
perf: perf-libsnowcrash
|
59
54
|
$(BUILD_DIR)/out/$(BUILDTYPE)/perf-libsnowcrash ./test/performance/fixtures/fixture-1.apib
|
60
55
|
|
61
|
-
|
62
|
-
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/snowcrash $(DESTDIR)/snowcrash
|
63
|
-
|
64
|
-
.PHONY: libsnowcrash test-libsnowcrash perf-libsnowcrash snowcrash clean distclean test
|
56
|
+
.PHONY: libsnowcrash test-libsnowcrash perf-libsnowcrash clean distclean test
|
@@ -2,16 +2,26 @@ Vagrant.configure("2") do |config|
|
|
2
2
|
config.vm.box = "precise64"
|
3
3
|
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
4
4
|
|
5
|
+
cpus = "1"
|
6
|
+
if ENV['VAGRANT_CPUS']
|
7
|
+
cpus = ENV['VAGRANT_CPUS']
|
8
|
+
end
|
9
|
+
|
10
|
+
memory = "4096"
|
11
|
+
if ENV['VAGRANT_MEMORY']
|
12
|
+
memory = ENV['VAGRANT_MEMORY']
|
13
|
+
end
|
14
|
+
|
5
15
|
# VirtualBox
|
6
16
|
config.vm.provider :virtualbox do |vb|
|
7
|
-
vb.customize ["modifyvm", :id, "--memory",
|
8
|
-
vb.customize ["modifyvm", :id, "--cpus",
|
17
|
+
vb.customize ["modifyvm", :id, "--memory", memory]
|
18
|
+
vb.customize ["modifyvm", :id, "--cpus", cpus]
|
9
19
|
end
|
10
20
|
|
11
21
|
# VMWare Fusion
|
12
22
|
config.vm.provider :vmware_fusion do |vb|
|
13
|
-
vb.vmx["memsize"] =
|
14
|
-
vb.vmx["numvcpus"] =
|
23
|
+
vb.vmx["memsize"] = memory
|
24
|
+
vb.vmx["numvcpus"] = cpus
|
15
25
|
end
|
16
26
|
|
17
27
|
config.vm.network :private_network, ip: "10.3.3.3"
|
File without changes
|
@@ -0,0 +1,197 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Attribution Notice
|
4
|
+
# ------------------
|
5
|
+
# This file uses parts of Node.js `configure`.
|
6
|
+
# Please refer to https://github.com/joyent/node.
|
7
|
+
#
|
8
|
+
|
9
|
+
import sys
|
10
|
+
|
11
|
+
|
12
|
+
if sys.version_info.major != 2:
|
13
|
+
# Since various Linux distros and OS X doesn't properly follow PEP 394,
|
14
|
+
# We've set the shebang line to `python` and erroring when it isn't
|
15
|
+
# Python 2.
|
16
|
+
print('{} requires Python 2, please install Python 2 and re-run this script.'.format(sys.argv[0]))
|
17
|
+
print('You may be able to do this with `python2 configure`.')
|
18
|
+
sys.exit()
|
19
|
+
|
20
|
+
|
21
|
+
import optparse
|
22
|
+
import os
|
23
|
+
import pprint
|
24
|
+
import re
|
25
|
+
import shlex
|
26
|
+
import subprocess
|
27
|
+
import platform
|
28
|
+
|
29
|
+
CC = os.environ.get('CC', 'cc')
|
30
|
+
|
31
|
+
root_dir = os.path.dirname(__file__)
|
32
|
+
build_dir = './build'
|
33
|
+
|
34
|
+
# Parse options
|
35
|
+
parser = optparse.OptionParser()
|
36
|
+
parser.add_option("--debug",
|
37
|
+
action="store_true",
|
38
|
+
dest="debug",
|
39
|
+
help="Also build the debug build.")
|
40
|
+
|
41
|
+
parser.add_option("--dest-cpu",
|
42
|
+
action="store",
|
43
|
+
dest="dest_cpu",
|
44
|
+
help="CPU architecture to build for. Valid values are: ia32, x64.")
|
45
|
+
|
46
|
+
parser.add_option("--shared",
|
47
|
+
action="store_true",
|
48
|
+
dest="shared",
|
49
|
+
help="Build and use shared libsnowcrash instead of static one.")
|
50
|
+
|
51
|
+
(options, args) = parser.parse_args()
|
52
|
+
|
53
|
+
def write(filename, data):
|
54
|
+
filename = os.path.join(root_dir, filename)
|
55
|
+
print("creating " + filename)
|
56
|
+
f = open(filename, 'w+')
|
57
|
+
f.write(data)
|
58
|
+
|
59
|
+
def cc_macros():
|
60
|
+
"""Checks predefined macros using the CC command."""
|
61
|
+
|
62
|
+
try:
|
63
|
+
p = subprocess.Popen(shlex.split(CC) + ['-dM', '-E', '-'],
|
64
|
+
stdin=subprocess.PIPE,
|
65
|
+
stdout=subprocess.PIPE,
|
66
|
+
stderr=subprocess.PIPE)
|
67
|
+
except OSError:
|
68
|
+
print('''Configure error: No acceptable C compiler found!
|
69
|
+
|
70
|
+
Please make sure you have a C compiler installed on your system and/or
|
71
|
+
consider adjusting the CC environment variable if you installed
|
72
|
+
it in a non-standard prefix.
|
73
|
+
''')
|
74
|
+
sys.exit()
|
75
|
+
|
76
|
+
p.stdin.write('\n')
|
77
|
+
out = p.communicate()[0]
|
78
|
+
|
79
|
+
out = str(out).split('\n')
|
80
|
+
|
81
|
+
k = {}
|
82
|
+
for line in out:
|
83
|
+
lst = shlex.split(line)
|
84
|
+
if len(lst) > 2:
|
85
|
+
key = lst[1]
|
86
|
+
val = lst[2]
|
87
|
+
k[key] = val
|
88
|
+
return k
|
89
|
+
|
90
|
+
def host_arch_cc():
|
91
|
+
"""Host architecture check using the CC command."""
|
92
|
+
|
93
|
+
k = cc_macros()
|
94
|
+
|
95
|
+
matchup = {
|
96
|
+
'__x86_64__' : 'x64',
|
97
|
+
'__i386__' : 'ia32',
|
98
|
+
'__arm__' : 'arm',
|
99
|
+
}
|
100
|
+
|
101
|
+
rtn = 'ia32' # default
|
102
|
+
|
103
|
+
for i in matchup:
|
104
|
+
if i in k and k[i] != '0':
|
105
|
+
rtn = matchup[i]
|
106
|
+
break
|
107
|
+
|
108
|
+
return rtn
|
109
|
+
|
110
|
+
def host_arch_win():
|
111
|
+
"""Host architecture check using environ vars (better way to do this?)"""
|
112
|
+
|
113
|
+
arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
|
114
|
+
|
115
|
+
matchup = {
|
116
|
+
'AMD64' : 'x64',
|
117
|
+
'x86' : 'ia32',
|
118
|
+
'arm' : 'arm',
|
119
|
+
}
|
120
|
+
|
121
|
+
return matchup.get(arch, 'ia32')
|
122
|
+
|
123
|
+
def configure_snowcrash(o):
|
124
|
+
# Build configuration
|
125
|
+
o['default_configuration'] = 'Debug' if options.debug else 'Release'
|
126
|
+
|
127
|
+
# Architecture
|
128
|
+
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
|
129
|
+
target_arch = options.dest_cpu or host_arch
|
130
|
+
o['variables']['host_arch'] = host_arch
|
131
|
+
o['variables']['target_arch'] = target_arch
|
132
|
+
o['variables']['libsnowcrash_type'] = 'shared_library' if options.shared else 'static_library'
|
133
|
+
|
134
|
+
#
|
135
|
+
# config.gypi
|
136
|
+
#
|
137
|
+
output = {
|
138
|
+
'variables': { 'python': sys.executable },
|
139
|
+
'include_dirs': [],
|
140
|
+
'libraries': [],
|
141
|
+
'defines': [],
|
142
|
+
'cflags': [],
|
143
|
+
}
|
144
|
+
|
145
|
+
configure_snowcrash(output)
|
146
|
+
|
147
|
+
# variables should be a root level element,
|
148
|
+
# move everything else to target_defaults
|
149
|
+
variables = output['variables']
|
150
|
+
del output['variables']
|
151
|
+
output = {
|
152
|
+
'variables': variables,
|
153
|
+
'target_defaults': output
|
154
|
+
}
|
155
|
+
|
156
|
+
write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
|
157
|
+
pprint.pformat(output, indent=2) + "\n")
|
158
|
+
|
159
|
+
#
|
160
|
+
# config.mk
|
161
|
+
#
|
162
|
+
config = {
|
163
|
+
'BUILDTYPE': 'Debug' if options.debug else 'Release',
|
164
|
+
'PYTHON': sys.executable,
|
165
|
+
'BUILD_DIR': build_dir,
|
166
|
+
}
|
167
|
+
config = '\n'.join(map('='.join, config.iteritems())) + '\n'
|
168
|
+
|
169
|
+
write('config.mk',
|
170
|
+
'# Do not edit. Generated by the configure script.\n' + config)
|
171
|
+
|
172
|
+
#
|
173
|
+
# Gyp call
|
174
|
+
#
|
175
|
+
print("creating makefiles")
|
176
|
+
|
177
|
+
gyp_args = ['--generator-output', build_dir, '--depth', '.']
|
178
|
+
if sys.platform == 'win32':
|
179
|
+
# Windows
|
180
|
+
gyp_args.extend(['-f', 'msvs'])
|
181
|
+
else:
|
182
|
+
# Posix systems
|
183
|
+
gyp_args.extend(['-f', 'make'])
|
184
|
+
|
185
|
+
# Include common.gypi and config.gypi
|
186
|
+
if sys.platform == 'win32':
|
187
|
+
options_fn = os.path.join(root_dir, 'config.gypi')
|
188
|
+
else:
|
189
|
+
options_fn = os.path.join(os.path.abspath(root_dir), 'config.gypi')
|
190
|
+
|
191
|
+
if os.path.exists(options_fn):
|
192
|
+
gyp_args.extend(['-I', options_fn])
|
193
|
+
|
194
|
+
subprocess.call([sys.executable, 'tools/gyp/gyp_main.py'] + gyp_args)
|
195
|
+
|
196
|
+
# All done
|
197
|
+
print("All OK.")
|