Re: Change a target within Makefile?

2024-08-09 Thread Masahiro Yamada
On Fri, Jul 26, 2024 at 9:35 AM Dmitry Goncharov wrote: > > On Wed, Jul 24, 2024 at 11:18 PM Masahiro Yamada wrote: > > You could do "make .foo.dtb.check" to compile foo.dtb, followed by > > the schema checking. > > > > I do not want to expose the presence of the timestamp file, > > as it is an i

$? behavior difference between grouped targets and a multi-target pattern rule

2024-08-09 Thread Masahiro Yamada
Hi. I have two similar Makefiles. [Makefile1] .PHONY: all all: foo.p foo.q foo.p foo.q &: foo.r FORCE @echo \$$? = $? touch foo.p ; touch foo.q .PHONY: FORCE [Makefile2] .PHONY: all all: foo.p foo.q %.p %.q : %.r FORCE @echo \$$? = $? touch foo.p ; touch

Re: $? behavior difference between grouped targets and a multi-target pattern rule

2024-08-09 Thread Dmitry Goncharov
On Fri, Aug 9, 2024 at 8:07 AM Masahiro Yamada wrote: > The value of $? is different. What do you observe if you wait between touching foo.r and touching foo.p? $ rm foo.*; touch foo.p; sleep 2; touch foo.r $ make -f makefile1 $? = foo.r FORCE touch foo.p ; touch foo.q $ $ rm foo.*; touch foo.p;

Re: $? behavior difference between grouped targets and a multi-target pattern rule

2024-08-09 Thread Masahiro Yamada
On Sat, Aug 10, 2024 at 8:01 AM Dmitry Goncharov wrote: > > On Fri, Aug 9, 2024 at 8:07 AM Masahiro Yamada wrote: > > The value of $? is different. > > What do you observe if you wait between touching foo.r and touching foo.p? > > $ rm foo.*; touch foo.p; sleep 2; touch foo.r > $ make -f makefile

Re: $? behavior difference between grouped targets and a multi-target pattern rule

2024-08-09 Thread Dmitry Goncharov
On Fri, Aug 9, 2024 at 9:09 PM Masahiro Yamada wrote: > Which GNU Make version did you test? 4.3 > As I mentioned, commit fabb03eac412b5ea19f1a97be31dc8c6fa7fc047 > changed (fixed) the behavior, which introduced the inconsistency > between grouped targets and a multi-target pattern rule. You ar