URL:
  <https://savannah.gnu.org/bugs/?55137>

                 Summary: $(file …) is executed too early when used in
recipe
                 Project: make
            Submitted by: mekk
            Submitted on: Fri 30 Nov 2018 10:59:17 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

I tried using the following snippet:

    OUTPUT/something :
         mkdir -p OUTPUT
         $(file > $@, something)

It crashes with 
     OUTPUT/something: No such file or directory. Stop.

Moreover, looks like file is executed before anything else happens, even if I
write:

    OUTPUT/something :
         /such/command/really/does/not/exist
         /neither/that/one
         $(file > $@, something)

I get the same error.

So I suppose file is executed too early, before earlier steps of the recipe
are completed. Here this causes failure, in other places it may cause writing
incorrect data.

~~~~~~~~

See attached Makefile for full working example – compare
    make good
with
    make bad



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 30 Nov 2018 10:59:17 AM UTC  Name: Makefile  Size: 201B   By: mekk

<http://savannah.gnu.org/bugs/download.php?file_id=45560>

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to