mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2025-04-21 12:27:27 +03:00
b2/: resolve FN in subst_init and don't consider an FN match evidence of existance
This commit is contained in:
11
b2/subst.c
11
b2/subst.c
@@ -25,6 +25,9 @@
|
||||
#include "subst.h"
|
||||
|
||||
|
||||
const char *fn;
|
||||
|
||||
|
||||
/* ----- Rule set construction --------------------------------------------- */
|
||||
|
||||
|
||||
@@ -297,7 +300,7 @@ static int find_var_use(const char *var, const struct subst *sub)
|
||||
while (sub) {
|
||||
switch (sub->type) {
|
||||
case st_match:
|
||||
if (sub->u.match.src == var)
|
||||
if (sub->u.match.src == var && var != fn)
|
||||
return 1;
|
||||
break;
|
||||
case st_assign:
|
||||
@@ -459,3 +462,9 @@ void subst_dump(FILE *file, const struct subst *sub)
|
||||
{
|
||||
recurse_dump(file, sub, 0);
|
||||
}
|
||||
|
||||
|
||||
void subst_init(void)
|
||||
{
|
||||
fn = unique("FN");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user