bug-make
[Top][All Lists]
Advanced

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

[bug #63172] Using --just-print, -n on a target that uses a multiline ma


From: anonymous
Subject: [bug #63172] Using --just-print, -n on a target that uses a multiline macro function will print as a single line
Date: Thu, 6 Oct 2022 12:49:02 -0400 (EDT)

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

                 Summary: Using --just-print, -n on a target that uses a
multiline macro function will print as a single line
                 Project: make
               Submitter: None
               Submitted: Thu 06 Oct 2022 04:49:00 PM UTC
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 06 Oct 2022 04:49:00 PM UTC By: Anonymous
Hi.

I noticed that if I have the following Makefile

```
define test_function
        echo $(1) \
                $(2) \
                $(3)
endef

.PHONY: test_function
test_function:
        $(call test_function,1,2,3)

.PHONY: test
test:
        echo 1 \
                2 \
                3
```

If I run `make test -n`, I will get my expected multiline human readable
output

```
✗ make test -n
echo 1 \
        2 \
        3
```

If I run `make test_function -n`, all of the commands will be 

```
✗ make test_function -n
echo 1 2 3
```

People have found some odd workarounds

https://stackoverflow.com/questions/47228973/how-to-properly-escape-recipe-newlines-in-multi-line-variable









    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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