[PATCH 1/6] * expand.c (variable_name_extract): extract variable name and strip prefix.

2014-08-14 Thread Macpaul Lin
Variables used in conditional lines usually has '$', '(', and ')' prefix, and etc. We can use vairable_name_extract() to extract pure variable name without these prefix. Signed-off-by: Macpaul Lin --- expand.c | 72 ++

[PATCH 6/6] * main.c: add --dep parameter for print variable dependency

2014-08-14 Thread Macpaul Lin
(print_dependency): print each value_record and parent_record of a variable. Signed-off-by: Macpaul Lin --- main.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 0508ae1..abbcb28 100644 --- a/main.c +++ b/main.c

[PATCH 3/6] * variable.c: Add support for constructing value_records and parent_records

2014-08-14 Thread Macpaul Lin
do_variable_definition (print_variable): dump value_record and parent_record for a variable (print_variable_dep_set): dump dependency of value_record, parent_record of a variable from a set. Signed-off-by: Macpaul Lin --- variable.c | 201 +++-- 1 file

[PATCH 4/6] * read.c: Construct the dependency chain between parent and target variable

2014-08-14 Thread Macpaul Lin
tempoaray parent_records for later dependency chain assignment for the target variable. Signed-off-by: Macpaul Lin --- read.c | 75 +- 1 file changed, 65 insertions(+), 10 deletions(-) diff --git a/read.c b/read.c index 6ac66f4

[PATCH 2/6] * variable.h: Add support of struct value_records and parent_records

2014-08-14 Thread Macpaul Lin
. Signed-off-by: Macpaul Lin --- variable.h | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/variable.h b/variable.h index 3e2328a..03ba18b 100644 --- a/variable.h +++ b/variable.h @@ -47,6 +47,23 @@ enum variable_flavor #define EXP_COUNT_BITS 15

[PATCH 5/6] * load.c: add support of parent_records

2014-08-14 Thread Macpaul Lin
(do_variable_definition): fix API consistency for supporting parent_records. Signed-off-by: Macpaul Lin --- load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/load.c b/load.c index b937c9f..78b800f 100644 --- a/load.c +++ b/load.c @@ -214,7 +214,8 @@ load_file (const

[PATCH v2 3/6] * variable.c: Add support for constructing value_records and parent_records

2014-08-18 Thread Macpaul Lin
erent parents sets. (print_value_records): a function to dump all value_records, parent_records, and other parents_records in depths belongs to this variable. Signed-off-by: Macpaul Lin --- Changes for v2: - simplify (free_parent_record). - simplify (free_variable_record). - add (dup_parent_re

[PATCH v2 2/6] * variable.h: Add support of struct value_records and parent_records

2014-08-18 Thread Macpaul Lin
. (dup_parent_record): a function for distinquish variables in the same conditional line's depth but may have different parents sets. Signed-off-by: Macpaul Lin --- Changes for v2: - add depth to struct parent_record. - add (dup_parent_record). - add depth support for (alloc_parent_r

[PATCH v2 1/6] * expand.c (variable_name_extract): extract variable name and strip prefix.

2014-08-18 Thread Macpaul Lin
Variables used in conditional lines usually has '$', '(', and ')' prefix, and etc. We can use vairable_name_extract() to extract pure variable name without these prefix. Signed-off-by: Macpaul Lin --- Changes for v2:

[PATCH v2 6/6] * main.c: add --dep parameter for print variable dependency

2014-08-18 Thread Macpaul Lin
(print_dependency): print each value_record and parent_record of a variable. Signed-off-by: Macpaul Lin --- Changes for v2: - no changes. main.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 0508ae1..abbcb28 100644

[PATCH v2 5/6] * load.c: add support of parent_records

2014-08-18 Thread Macpaul Lin
(do_variable_definition): fix API consistency for supporting parent_records. Signed-off-by: Macpaul Lin --- Changes for v2: - no changes. load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/load.c b/load.c index b937c9f..78b800f 100644 --- a/load.c +++ b/load.c

[PATCH v2 4/6] * read.c: Construct the dependency chain between parent and target variable

2014-08-18 Thread Macpaul Lin
tempoaray parent_records for later dependency chain assignment for the target variable. Signed-off-by: Macpaul Lin --- Changes for v2: - (eval): fix the problem of mapping the same parent_records set to multiple variable in the same ifdef/ifeq depth. - (conditional_line): add if_cmds->de

Re: [PATCH v2 1/6] * expand.c (variable_name_extract): extract variable name and strip prefix.

2014-08-21 Thread Macpaul Lin
Hi, Paul and other developers, 2014-08-18 22:35 GMT+08:00 Paul Smith : > On Mon, 2014-08-18 at 21:27 +0800, Macpaul Lin wrote: >> Variables used in conditional lines usually has '$', >> '(', and ')' prefix, and etc. >> We can use vairable_name