Skip to content

Commit 450d048

Browse files
Nikolay OrliukAnatolii Sakhnik
authored andcommitted
Avoid changing source folders
:Release Notes: Now build process only changes build/binary folder. :Detailed Notes: - changed apply_lemon.sh to avoid generation of files inside of source folder - added dependency on apply_lemon.sh for targets generated by it :Testing Performed: Desktop build :QA Notes: :Issues Addressed: [BHV-123] pbnjson: Improve performance of json parsing with YAJL Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <[email protected]> Change-Id: I7e0011d5202ce52af559a036b304d41bb3d34f63 Reviewed-on: https://g2g.palm.com/4862 Reviewed-by: DCO Verification Reviewed-by: Anatolii Sakhnik <[email protected]> Tested-by: Anatolii Sakhnik <[email protected]> Reviewed-by: Nikolay Orliuk <[email protected]> Tested-by: Nikolay Orliuk <[email protected]>
1 parent f272e37 commit 450d048

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/pbnjson_c/validation/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ add_custom_command(
3434
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/json_schema_grammar.c
3535
${CMAKE_CURRENT_BINARY_DIR}/json_schema_grammar.h
3636
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/json_schema_grammar.y
37+
${CMAKE_CURRENT_SOURCE_DIR}/apply_lemon.sh
3738
)
3839

3940
set(grammar_c ${CMAKE_CURRENT_BINARY_DIR}/json_schema_grammar.c)

src/pbnjson_c/validation/apply_lemon.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# @@@LICENSE
44
#
5-
# Copyright (c) 2009-2013 LG Electronics, Inc.
5+
# Copyright (c) 2009-2014 LG Electronics, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
1919
# LICENSE@@@
2020

2121
lemon=$1
22-
binary_dir=$2
23-
source_dir=$3
22+
binary_dir=$(readlink -f "$2")
23+
source_dir=$(readlink -f "$3")
2424
file=$4
2525

2626
keyword_pattern="KEY_[0-9A-Za-z_]*"
@@ -44,7 +44,9 @@ if [ "$expected_tokens" != "$token_keywords" ]; then
4444
exit 1
4545
fi
4646

47-
$lemon $source_dir/$file || exit 1
4847
if [ "$source_dir" != "$binary_dir" ]; then
49-
mv -f $source_dir/${file%.y}.{c,h,out} $binary_dir || exit 1
48+
ln -sf "$source_dir/$file" "$binary_dir/" || \
49+
cp -af "$source_dir/$file" "$binary_dir/" || \
50+
exit 1
5051
fi
52+
"$lemon" "$binary_dir/$file" || exit 1

0 commit comments

Comments
 (0)