[bug #41273] wildcard function does not return newly created file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #41273] wildcard function does not return newly created file

anonymous
URL:
  <http://savannah.gnu.org/bugs/?41273>

                 Summary: wildcard function does not return newly created file
                 Project: make
            Submitted by: None
            Submitted on: Sun 19 Jan 2014 04:12:03 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: MS Windows
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Using a simple makefile under Windows 7, it became apparent that the wildcard
function does not reflect the existence of a library created when the first
object was added to it.

This is make 3.81, as downloaded from gnuwin32:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32

C:\Users\admin\dev\lib\ll>

The attached listing shows both the GNUmakefile, and the resulting output
showing that $(wildcard ll.lib) does not recognize the existence of the
library after it was created.

However, my workaround $(mywildcard) gives the correct results one would
expect from the wildcard function.  This is consistent with the mention that a
cache is probably used to avoid actually checking the filesystem and can
therefore cause inconsistent results.  Curiously, repeated tests showed that
occasionally the wildcard function would begin showing the existence of the
library file in the middle of building and adding the eight object files.  But
usually it would not recognize the file until the make was run a second time.

Thank you,

Harry Clauson




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41273>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #41273] wildcard function does not return newly created file

anonymous
Additional Item Attachment, bug #41273 (project make):

File name: wildcard.txt                   Size:6 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41273>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #41273] wildcard function does not return newly created file

anonymous
Follow-up Comment #1, bug #41273 (project make):

This is a function make's internal directory caching mechanism.  The wildcard
function looks through the internal cache (where it exists) not the local
filesystem, which means that if there are rules that create files make doesn't
know about (e.g., ones that didn't exist when make started and are not listed
as targets of the recipes make runs) then they may not show up in the results
of the wildcard function.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41273>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #41273] Directory cache causes issues with wildcard, etc.

anonymous
Update of bug #41273 (project make):

        Operating System:              MS Windows => Any                    
           Triage Status:                    None => Medium Effort          
                 Summary: wildcard function does not return newly created file
=> Directory cache causes issues with wildcard, etc.

    _______________________________________________________

Follow-up Comment #2:

For other issues with caching see bug #14617, bug #443, bug #21231 as well as
http://lists.gnu.org/archive/html/help-make/2015-02/msg00010.html and various
other email threads and SO questions...

We need to either find a way to keep all or most of the benefits of the cache
without causing these problems (maybe find a better way to invalidate the
cache?), or else allow the user to disable it when they want to write
"questionable" makefiles that assume no caching.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41273>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #41273] Directory cache causes issues with wildcard, etc.

anonymous
Follow-up Comment #3, bug #41273 (project make):

Duplicated by #57102

    _______________________________________________________

Reply to this item at:

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

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