{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/74429396","id":74429396,"diff_hunk":"@@ -0,0 +1,204 @@\n+#!/usr/bin/env python\n+\n+# Copyright 2016 Intel Corporation\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+import sys\n+import os\n+\n+# create soft link\n+def build_soft_links(curie_path, jerry_path):\n+    location_path = os.path.join(curie_path, 'wearable_device_sw/projects/curie_bsp_jerry')\n+    if not os.path.exists(location_path):\n+        os.makedirs(location_path)\n+    os.chdir(location_path)\n+    # arc\n+    if not os.path.islink(os.path.join(location_path, 'arc')):\n+        os.symlink(os.path.join(jerry_path, 'targets/curie_bsp/jerry_app/arc'), 'arc')\n+\n+    # include\n+    if not os.path.islink(os.path.join(location_path, 'include')):\n+        os.symlink(os.path.join(jerry_path, 'targets/curie_bsp/jerry_app/include'), 'include')\n+    # quark\n+    if not os.path.islink(os.path.join(location_path, 'quark')):\n+        os.symlink(os.path.join(jerry_path, 'targets/curie_bsp/jerry_app/quark'), 'quark')\n+\n+    # jerryscript\n+    location_path = os.path.join(location_path, 'quark')\n+    os.chdir(location_path)\n+    if not os.path.islink(os.path.join(location_path, 'jerryscript')):\n+        os.symlink(jerry_path, 'jerryscript')\n+\n+\n+# create Kbuild.mk\n+def breadth_first_travel(root_dir):\n+    out_put = ''\n+    lists = os.listdir(root_dir)\n+    dirs = []\n+    for line in lists:\n+        full_path = os.path.join(root_dir, line)\n+        if os.path.isdir(full_path):\n+            dirs.append(line)\n+        else:\n+            c_file = line.endswith('.c')\n+            if c_file:\n+                npos = line.find('.c')\n+                out_put += 'obj-y += ' + line[0:npos] + '.o\\n'\n+                continue\n+            asm_file = line.endswith('.S')\n+            if asm_file:\n+                npos = line.find('.S')\n+                out_put += 'obj-y += ' + line[0:npos] + '.o\\n'\n+    for line in dirs:\n+        out_put += 'obj-y += ' + line + '/\\n'\n+\n+    file_path = os.path.join(root_dir, 'Kbuild.mk')\n+    file_to_be_created = open(file_path, 'w+')\n+    file_to_be_created.write(out_put)\n+    file_to_be_created.close()\n+    for line in dirs:\n+        breadth_first_travel(os.path.join(root_dir, line))\n+\n+\n+\n+# create Kbuild.mk in jerryscript/\n+def create_kbuild_in_jerryscript(jerry_path):\n+    breadth_first_travel(os.path.join(jerry_path, 'jerry-core'))\n+    breadth_first_travel(os.path.join(jerry_path, 'jerry-libm'))\n+    #jerryscript/\n+    out_put = '''\n+    obj-y += jerry-core/\n+    obj-y += jerry-libm/\n+    obj-y += targets/\n+    subdir-cflags-y += -DCONFIG_MEM_HEAP_AREA_SIZE=10*1024\n+    subdir-cflags-y += -DJERRY_NDEBUG\n+    subdir-cflags-y += -DJERRY_DISABLE_HEAVY_DEBUG\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN\n+    #subdir-cflags-y += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTIN\n+    subdir-cflags-y += -DCONFIG_ECMA_LCACHE_DISABLE\n+    subdir-cflags-y += -DCONFIG_ECMA_PROPERTY_HASHMAP_DISABLE\n+    '''\n+\n+    file_path = os.path.join(jerry_path, 'Kbuild.mk')\n+    file_to_be_created = open(file_path, 'w+')\n+    file_to_be_created.write(out_put)\n+    file_to_be_created.close()\n+\n+    # jerryscript/targets\n+    out_put =  'obj-y += curie_bsp/'\n+    file_path = os.path.join(jerry_path, 'targets/Kbuild.mk')\n+    file_to_be_created = open(file_path, 'w+')\n+    file_to_be_created.write(out_put)\n+    file_to_be_created.close()\n+\n+    # jerryscript/targets/curie_bsp\n+    out_put =  'obj-y += source/'\n+    file_path = os.path.join(jerry_path, 'targets/curie_bsp/Kbuild.mk')\n+    file_to_be_created = open(file_path, 'w+')\n+    file_to_be_created.write(out_put)\n+    file_to_be_created.close()\n+\n+    breadth_first_travel(os.path.join(jerry_path, 'targets/curie_bsp/source'))\n+\n+# create Makefile in wearable_device_sw/projects/curie_bsp_jerry/\n+def create_makefile_in_curie(curie_path):\n+\n+    # Kbuild.mk\n+    out_put = '''\n+    subdir-cflags-y += -I$(PROJECT_PATH)/quark/include\n+    subdir-cflags-y += -I$(PROJECT_PATH)/quark/jerryscript\n+    subdir-cflags-y += -I$(PROJECT_PATH)/quark/jerryscript/jerry-core","path":"targets/curie_bsp/setup.py","position":129,"original_position":129,"commit_id":"d8ba329cc78ca7e3c16d6481967a89f66e6ee6b5","original_commit_id":"d8ba329cc78ca7e3c16d6481967a89f66e6ee6b5","user":{"login":"akosthekiss","id":9976482,"avatar_url":"https://avatars.githubusercontent.com/u/9976482?v=3","gravatar_id":"","url":"https://api.github.com/users/akosthekiss","html_url":"https://github.com/akosthekiss","followers_url":"https://api.github.com/users/akosthekiss/followers","following_url":"https://api.github.com/users/akosthekiss/following{/other_user}","gists_url":"https://api.github.com/users/akosthekiss/gists{/gist_id}","starred_url":"https://api.github.com/users/akosthekiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akosthekiss/subscriptions","organizations_url":"https://api.github.com/users/akosthekiss/orgs","repos_url":"https://api.github.com/users/akosthekiss/repos","events_url":"https://api.github.com/users/akosthekiss/events{/privacy}","received_events_url":"https://api.github.com/users/akosthekiss/received_events","type":"User","site_admin":false},"body":"IMHO, all the subdirs of jerry-core shouldn't be hardcoded here. It would be inconvenient to maintain this list if anything changes in the core (which can happen without notice as its structure is an internal thing without any promise on stability). A recursive traversal of the dir structure should be used at run time instead.","created_at":"2016-08-11T14:13:35Z","updated_at":"2016-08-11T14:13:35Z","html_url":"https://github.com/Samsung/jerryscript/pull/1234#discussion_r74429396","pull_request_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234","_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/74429396"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/1234#discussion_r74429396"},"pull_request":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234","id":79703451,"html_url":"https://github.com/Samsung/jerryscript/pull/1234","diff_url":"https://github.com/Samsung/jerryscript/pull/1234.diff","patch_url":"https://github.com/Samsung/jerryscript/pull/1234.patch","issue_url":"https://api.github.com/repos/Samsung/jerryscript/issues/1234","number":1234,"state":"open","locked":false,"title":"add target port: curie_bsp","user":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"body":"Intel® Curie BSP is the SDK that will help you developing software on Curie based boards, for example with the Arduino 101 board (AKA Genuino 101). https://github.com/CurieBSP/main/releases\r\n\r\nWe plan to add the curie_bsp port in the jerryscript/targets, so that CurieBSP users can develop js app.","created_at":"2016-08-02T09:32:58Z","updated_at":"2016-08-11T14:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0caa5bcd1b4f4870ed98e642a1d0d88f5396503f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234/commits","review_comments_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234/comments","review_comment_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/issues/1234/comments","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/d8ba329cc78ca7e3c16d6481967a89f66e6ee6b5","head":{"label":"jiangzidong:curie_bsp","ref":"curie_bsp","sha":"d8ba329cc78ca7e3c16d6481967a89f66e6ee6b5","user":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"repo":{"id":43999422,"name":"jerryscript","full_name":"jiangzidong/jerryscript","owner":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiangzidong/jerryscript","description":"Ultra-lightweight JavaScript engine for Internet of Things. http://www.jerryscript.net","fork":true,"url":"https://api.github.com/repos/jiangzidong/jerryscript","forks_url":"https://api.github.com/repos/jiangzidong/jerryscript/forks","keys_url":"https://api.github.com/repos/jiangzidong/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiangzidong/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiangzidong/jerryscript/teams","hooks_url":"https://api.github.com/repos/jiangzidong/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/jiangzidong/jerryscript/events","assignees_url":"https://api.github.com/repos/jiangzidong/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/jiangzidong/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/jiangzidong/jerryscript/tags","blobs_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiangzidong/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/jiangzidong/jerryscript/languages","stargazers_url":"https://api.github.com/repos/jiangzidong/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/jiangzidong/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/jiangzidong/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/jiangzidong/jerryscript/subscription","commits_url":"https://api.github.com/repos/jiangzidong/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiangzidong/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiangzidong/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/jiangzidong/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiangzidong/jerryscript/merges","archive_url":"https://api.github.com/repos/jiangzidong/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiangzidong/jerryscript/downloads","issues_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/jiangzidong/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/jiangzidong/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/jiangzidong/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiangzidong/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/jiangzidong/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/jiangzidong/jerryscript/deployments","created_at":"2015-10-10T07:17:28Z","updated_at":"2015-10-10T07:17:31Z","pushed_at":"2016-08-05T13:27:13Z","git_url":"git://github.com/jiangzidong/jerryscript.git","ssh_url":"git@github.com:jiangzidong/jerryscript.git","clone_url":"https://github.com/jiangzidong/jerryscript.git","svn_url":"https://github.com/jiangzidong/jerryscript","homepage":"","size":11104,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Samsung:master","ref":"master","sha":"67b494dcff75307fb34a4af1950aba7e0334f677","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"Samsung/jerryscript","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/jerryscript","description":"Ultra-lightweight JavaScript engine for the Internet of Things. http://samsung.github.io/jerryscript","fork":false,"url":"https://api.github.com/repos/Samsung/jerryscript","forks_url":"https://api.github.com/repos/Samsung/jerryscript/forks","keys_url":"https://api.github.com/repos/Samsung/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/jerryscript/teams","hooks_url":"https://api.github.com/repos/Samsung/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/Samsung/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/jerryscript/events","assignees_url":"https://api.github.com/repos/Samsung/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/jerryscript/tags","blobs_url":"https://api.github.com/repos/Samsung/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/jerryscript/languages","stargazers_url":"https://api.github.com/repos/Samsung/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/Samsung/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/Samsung/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/Samsung/jerryscript/subscription","commits_url":"https://api.github.com/repos/Samsung/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/jerryscript/merges","archive_url":"https://api.github.com/repos/Samsung/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/jerryscript/downloads","issues_url":"https://api.github.com/repos/Samsung/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/Samsung/jerryscript/deployments","created_at":"2015-04-03T01:10:31Z","updated_at":"2016-08-11T12:39:00Z","pushed_at":"2016-08-11T13:04:54Z","git_url":"git://github.com/Samsung/jerryscript.git","ssh_url":"git@github.com:Samsung/jerryscript.git","clone_url":"https://github.com/Samsung/jerryscript.git","svn_url":"https://github.com/Samsung/jerryscript","homepage":"","size":27822,"stargazers_count":1456,"watchers_count":1456,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":165,"mirror_url":null,"open_issues_count":50,"forks":165,"open_issues":50,"watchers":1456,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/1234"},"issue":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/1234"},"comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/1234/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/1234/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/jerryscript/statuses/d8ba329cc78ca7e3c16d6481967a89f66e6ee6b5"}}}}
{"actor":{"display_login":"akosthekiss"}}