[Top][All Lists]

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

[bug #47913] newlines lost with $(foreach)

From: Oliver Kiddle
Subject: [bug #47913] newlines lost with $(foreach)
Date: Fri, 13 May 2016 14:41:27 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0


                 Summary: newlines lost with $(foreach)
                 Project: make
            Submitted by: opk
            Submitted on: Fri 13 May 2016 04:41:26 PM CEST
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: Any
           Fixed Release: None
           Triage Status: None



I tried the 4.1.90 release candidate with my Makefiles and found a problem due
to it behaving differently to previous releases with regard to newlines being
lost from a variable when using $(foreach).

Simplifying things a lot, what I have is roughly along these lines:

  File.cpp: File.h
  Other.cpp: Other.h

here = here

  $(eval $(foreach dep,$(FILEDEPS),$(or $(filter :,$(dep)),$(abspath

To put this into context, I use a non-recursive setup where a small Makefile
in each individual directory contains definitions for that directory's
contents and then includes a complex common makefile which defines all the
rules and includes all the other Makefiles. So this allows certain extra file
depenencies to be defined without specifying the directory. here is actually
set with something like the following so that it points to the directory of
the current directory specific

here := $(dir $(lastword $(filter-out %.d %.D %.mk %/config.inc $(lastword

With 4.1.90, I get a "multiple target patterns" error. If you change $(eval)
for $(info), current releases of GNU make show the two file dependencies. With
4.1.90, it has wrapped them onto a single line.

Is this an intentional change, a bug or just an implementation quirk that I
shouldn't have relied on?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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