commit 6ac6dfa14c6cef6193859611763cb5d5ac71ab4d from: Benjamin Stürz date: Wed Nov 13 00:50:05 2024 UTC make: fix recursion commit - cb61fe3c30d8d2166f8879b11dc8d229e3167b9f commit + 6ac6dfa14c6cef6193859611763cb5d5ac71ab4d blob - 6f298860a93b6ecdd0f66e4f148d93162268be43 blob + 6e2cff82cea83062da19fa58ec27b7878dd5f6af --- make/make.c +++ make/make.c @@ -860,10 +860,12 @@ struct path *dir; if (parent->type != SC_DIR) errx (1, "%s: invalid parent type", path_to_str (mfpath)); + for (sc = parent->dir->subdirs; sc != NULL; sc = sc->next) { - if (sc->name == name) { + if (strcmp (sc->name, name) == 0) { if (sc->type != SC_DIR) errx (1, "%s: invalid type", path_to_str (mfpath)); + sc->parent = parent; goto parse; } } @@ -874,7 +876,7 @@ struct path *dir; sc = new (struct scope); sc->type = SC_DIR; sc->name = name; - sc->parent = NULL; + sc->parent = parent; sc->dir = NULL; }