{
- char *name = "CURDIR", *cwd, *path;
+ char *cwd, *path;
size_t len;
cwd = get_current_directory ();
- len = strlen (name) + 4 + strlen (cwd);
+ len = strlen ("CURDIR") + 4 + strlen (cwd);
path = xmalloc (len + 1);
- sprintf (path, "%s ?= %s", name, cwd);
+ sprintf (path, "CURDIR ?= %s", cwd);
+
+ parse_var_line (path, VAR_ORIGIN_FILE);
+ free (path);
+
+ len = strlen (".CURDIR") + 4 + strlen (cwd);
+
+ path = xmalloc (len + 1);
+ sprintf (path, ".CURDIR ?= %s", cwd);
parse_var_line (path, VAR_ORIGIN_FILE);
free (path);