bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #48643] Irrelevant targets can confuse make on which pattern rule t


From: Steven Simpson
Subject: [bug #48643] Irrelevant targets can confuse make on which pattern rule to select.
Date: Sun, 7 Feb 2021 13:00:41 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Follow-up Comment #2, bug #48643 (project make):

I think the problem might be in src/implicit.c.

>From 3.81 code:


              /* The DEP->changed flag says that this dependency resides in a
                 nonexistent directory.  So we normally can skip looking for
                 the file.  However, if CHECK_LASTSLASH is set, then the
                 dependency file we are actually looking for is in a
different
                 directory (the one gotten by prepending FILENAME's
directory),
                 so it might actually exist.  */

              /* @@ dep->changed check is disabled. */
              if (((f = lookup_file (name)) != 0 && f->is_target)
                  /*|| ((!dep->changed || check_lastslash) && */
                  || file_exists_p (name))
                continue;


The corresponding check in 4.3:


                  if (lookup_file (d->name) != 0
                      /*|| ((!dep->changed || check_lastslash) && */
                      || file_exists_p (d->name))


There's no check for f->is_target on the result of lookup_file, so I presume
it is picking up the name as a dependency.  Perhaps it should read:


                  if (((f = lookup_file (d->name)) != 0 && f->is_target)
                      /*|| ((!dep->changed || check_lastslash) && */
                      || file_exists_p (d->name))


f is a [struct file *], not declared in 4.3.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?48643>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]