+{
+ /*
+ * VPATH= ${PATH1}:${PATH2} didn't work. This fix is so ugly I don't
+ * even want to think about it. Basically it grabs VPATH and
+ * explicitly does macro expansion before resolving names. Why
+ * VPATH didn't get handled correctly I have no idea; the symptom
+ * was that, while macro expansion got done, the .c files in the
+ * non-local directories wouldn't be found.
+ */
+ struct varblock *vpath_cp, *varptr();
+ static int vpath_first;
+ char vpath_exp[INMAX];
+
+ if (!vpath_first) {
+ vpath_first = 1;
+ vpath_cp = varptr("VPATH");
+ if (vpath_cp->varval) {
+ subst(vpath_cp->varval, vpath_exp);
+ setvar("VPATH",vpath_exp);
+ }
+ }
+}