bug-make
[Top][All Lists]
Advanced

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

[bug #50376] Incompatibility in make versions - directory/ dependency no


From: Gur Stavi
Subject: [bug #50376] Incompatibility in make versions - directory/ dependency no longer match directory goal
Date: Wed, 22 Feb 2017 03:06:38 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36

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

                 Summary: Incompatibility in make versions - directory/
dependency no longer match directory goal
                 Project: make
            Submitted by: gstavi
            Submitted on: Wed 22 Feb 2017 08:06:37 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: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Consider the makefile below.

OUT_DIR = my_dir
OUT_FILE = $(OUT_DIR)/hello.txt

$(OUT_FILE): | $(dir $(OUT_FILE))
        echo Hello World > $@

$(OUT_DIR):
        mkdir $@

Running with make v3.81 results in:
mkdir my_dir
echo Hello World > my_dir/hello.txt

Running with Make v4.2.1 results in:
make: *** No rule to make target 'my_dir/', needed by 'my_dir/hello.txt'. 
Stop.

Is this intentional?

Since $(dir) function keeps slash at the end of the result it mostly forces
directory goals to have the slash as well. It may be a good habit but could be
a big compatibility issue for existing makefiles. I encountered it when make
failed on a colleague's newer system.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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