1
0
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:
Werner Almesberger
2012-06-03 02:04:27 -03:00
parent c6e394436c
commit c2414a5d2c
4 changed files with 17 additions and 3 deletions

View File

@@ -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");
}