> From: Paul Smith <[email protected]>
> Cc: Frank Heckenbach <[email protected]>, [email protected]
> Date: Sun, 21 Apr 2013 19:30:05 -0400
>
> On Fri, 2013-04-19 at 14:09 +0300, Eli Zaretskii wrote:
> > > Date: Fri, 19 Apr 2013 11:54:05 +0200
> > > Cc: [email protected], [email protected]
> > > From: Frank Heckenbach <[email protected]>
> > >
> > > > Is there a simple enough Makefile somewhere that could be used to test
> > > > this feature, once implemented?
> > >
> > > We have a test in the test suite (output-sync). Can you use that?
> >
> > I hoped for something simpler and not involving Perl or Unixy shell
> > features, because I'd like to use this in the native Windows
> > environment, where the Windows port of Make runs. However, if that's
> > the best possibility, I guess I'd craft something based on that test.
>
> The basic feature can be tested trivially like this:
>
> all: one two
>
> one two:
> @echo start $@
> @sleep 1
> @echo stop $@
>
> Now if you run this using "make -j" you'll get:
>
> start one
> start two
> stop one
> stop two
>
> If you run this using "make -j -O" you should get:
>
> start one
> stop one
> start two
> stop two
>
> There's more to test than that: before it's done we need to test
> recursive make invocations for example. But the above is simple.
Thanks, I tested this, and also the recursive behavior. But I'm not
sure whether the results in some less-than-trivial cases are as
intended (although I see exactly the same behavior on GNU/Linux, so
the questions below are not Windows-specific).
E.g., with this Makefile, called mkfsync, (indented 2 spaces for
clarity):
all: simple recursive
simple: one two
one two:
@echo start $@
@sleep 1
@echo stop $@
@-false
recursive: rec1 rec2
rec1 rec2:
@echo start $@
$(MAKE) -f mkfsync simple
@echo stop $@
and invoking Make as "gnumake -j -O -f mkfsync", I get this output:
gnumake -f mkfsync simple
gnumake -f mkfsync simple
mkfsync:6: recipe for target 'one' failed
gnumake: [one] Error 1 (ignored)
start one
stop one
mkfsync:6: recipe for target 'two' failed
gnumake: [two] Error 1 (ignored)
start two
stop two
start rec1
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
mkfsync:6: recipe for target 'one' failed
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: [one] Error 1 (ignored)
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
start one
stop one
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
mkfsync:6: recipe for target 'two' failed
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: [two] Error 1 (ignored)
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
start two
stop two
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
stop rec1
start rec2
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
mkfsync:6: recipe for target 'one' failed
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: [one] Error 1 (ignored)
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
start one
stop one
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
mkfsync:6: recipe for target 'two' failed
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: [two] Error 1 (ignored)
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Entering directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
start two
stop two
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
gnumake[1]: Leaving directory 'D:/gnu/make-3.82.90_GIT_2013-04-20'
stop rec2
Is this intended behavior that these two messages:
mkfsync:6: recipe for target 'two' failed
gnumake[1]: [two] Error 1 (ignored)
are separated and wrapped by separate "Entering...Leaving" blocks,
instead of being produced together? They are both produced by a call
to 'message', which outputs the message to stdout, so it's not like
they went to two different streams. Am I missing something?
If this is intended behavior, can we somehow cut down on these
"Entering...Leaving" pairs? They add a lot of clutter and make it
hard to read the output of a Make run.
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make