From: Ian Jackson Date: Sat, 28 Dec 2019 12:27:40 +0000 (+0000) Subject: Warnings: Track settings of variables X-Git-Tag: subdirmk/0.3~35 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=9ef44574417286a94e60170c358134392eb9034b;hp=8534ffc15c44bfd2f7a72ee745afd284255d17c7;p=subdirmk.git Warnings: Track settings of variables Where the variable tracking does not involve &-escapes, or only involves &-escapes which work like a prefix so the processor does not have the whole variable name, we do this separately from processing. This is simpler because we can look ahead more. It also avoids disturbing the processing logic (which needs to be precisely accurate, unlike this variable tracking). Signed-off-by: Ian Jackson --- diff --git a/generate b/generate index 03aabb0..cbc9172 100755 --- a/generate +++ b/generate @@ -245,6 +245,10 @@ sub process_input_mk ($$$$) { }; while (<$input>) { + if (m#^\s*($esc)?(\w+)\s*(?:=|\+=|\?=|:=)# || + m#^\s*(?:$esc\:macro|define)\s+($esc)?(\S+)\s#) { + $note_varref->($2,!!$1); + } if (s#^\s*$esc\:changequote\s+(\S+)\s+$##) { $$esclitr = $1; $set_esc->();