0

I typed make aaa.zzz after touch a b c. I got nothing. No stdout, no stderr. Why?

GNU Make 3.82

It doesn't work.

.SECONDEXPANSION: 

%.xxx: $$(shell echo a b c)
    echo in xxx

%.zzz: %.xxx $$(shell echo a b)
    echo in zzz

It works. (echo a b to echo a b c)

.SECONDEXPANSION: 

%.xxx: $$(shell echo a b c)
    echo in xxx

%.zzz: %.xxx $$(shell echo a b c)
    echo in zzz

It works. (echo a b c to echo b c)

.SECONDEXPANSION: 

%.xxx: $$(shell echo b c)
    echo in xxx

%.zzz: %.xxx $$(shell echo a b)
    echo in zzz

It works. (echo a b to echo a)

.SECONDEXPANSION: 

%.xxx: $$(shell echo a b c)
    echo in xxx

%.zzz: %.xxx $$(shell echo a)
    echo in zzz

-d says as below.

> make aaa.zzz -d
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
...
Updating goal targets....
Considering target file `aaa.zzz'.
 File `aaa.zzz' does not exist.
 Looking for an implicit rule for `aaa.zzz'.
 Trying pattern rule with stem `aaa'.
 Trying implicit prerequisite `aaa.xxx'.
 Trying pattern rule with stem `aaa.zzz'.
 Trying implicit prerequisite `aaa.zzz,v'.
 Trying pattern rule with stem `aaa.zzz'.
 Trying implicit prerequisite `RCS/aaa.zzz,v'.
 Trying pattern rule with stem `aaa.zzz'.
 Trying implicit prerequisite `RCS/aaa.zzz'.
 Trying pattern rule with stem `aaa.zzz'.
 Trying implicit prerequisite `s.aaa.zzz'.
 Trying pattern rule with stem `aaa.zzz'.
 Trying implicit prerequisite `SCCS/s.aaa.zzz'.
 Trying pattern rule with stem `aaa'.
 Trying implicit prerequisite `aaa.xxx'.
 Looking for a rule with intermediate file `aaa.xxx'.
  Avoiding implicit rule recursion.
  Trying pattern rule with stem `aaa'.
  Trying implicit prerequisite `a'.
  Trying implicit prerequisite `b'.
  Trying implicit prerequisite `c'.
 Trying implicit prerequisite `a'.
 Trying implicit prerequisite `b'.
(END)
4
  • Can't reproduce, the first snippet works for me. Make 4.4.1. Commented Jul 6 at 12:21
  • 1
    Oh, I have confirmed that it works on my laptop (GNU Make 4.2.1). Also, I installed GNU Make 4.4 and it resolved. Really thanks. Commented Jul 6 at 12:51
  • You're welcome. I suggest posting an answer explaining that this is a Make bug. And then pressing the checkmark on it to mark the question as solved. Commented Jul 6 at 13:26
  • 1
    Thanks for the advice and the guidance on the flow of this site. Sorry for late reply. Commented Jul 16 at 13:33

1 Answer 1

1

This may be a bug in GNU Make 3.82. After I upgraded to GNU Make 4.4, the issue was resolved.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.