(struct parent_record): add struct parent_record,
for constructing variables dependencies.
(struct value_record): add struct value_record for record
each value is assigned to a variable.
(variable_name_extract): add support to extract variable name
with [$()] prefix.
(alloc_parent_record): a functi
(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 gm
(define_variable_in_set): assign NULL as initial value of a pointer to
value_record.
(free_parent_record): free all parent_records which were assigned.
(free_variable_record): free all value_records and related parent_records
belongs to a variable.
(free_variable_name_and_value): add free_variable_
(eval_makefile): deal with new parent_records paremeter for API consistancy,
(eval): assign related parent_records to target variable, and construct
tempoaray parent_records when ifdef/ifeq conditional_line is parsed.
(conditional_line): when ifdef/ifeq conditional_line is encountered,
construct te
(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
@@ -53,
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
1 file changed,