Fix regexp of generate_api.py used to grap '//#' directives 27/53227/1 accepted/tizen/mobile/20151203.074939 accepted/tizen/tv/20151203.074957 accepted/tizen/wearable/20151203.075016 submit/tizen/20151203.031549 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorWonYoung Choi <wy80.choi@samsung.com>
Thu, 3 Dec 2015 03:00:42 +0000 (12:00 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Thu, 3 Dec 2015 03:00:42 +0000 (12:00 +0900)
generate_api.py should replace '//#' to '#' if that is starting
from first column of lines.

Change-Id: Ia735ba60a72f7c6e231a7d7ba1b7a2cf49ea7135

tools/build/generate_api.py

index ec4f0d1..193e2c5 100644 (file)
@@ -12,7 +12,7 @@ const char %s[] = { %s, 0 };
 """
 
 js_code = sys.argv[1]
-cmd = "sed -e 's#//\##\##g' " + js_code + " | cpp -E -P "
+cmd = "sed -e 's#^//\##\##g' " + js_code + " | cpp -E -P "
 lines = subprocess.check_output(cmd, shell=True)
 c_code = ', '.join(str(ord(c)) for c in lines)