> From: Gisle Vanem <gvanem@...>
> Date: Mon, 22 Jul 2013 21:14:52 +0200
> "Eli Zaretskii" <eliz@...> wrote:
> > CreateProcess has a flag that makes the new process the root process
> > of a new process group, see CREATE_NEW_PROCESS_GROUP on this page:
> > http://msdn.microsoft.com/en-us/library/windows/desktop/ms684863%28v=vs.85%29.aspx
> Thanks for that pointer. Interesting why Msys sees the need to create a
> new process group.
Something for the MSYS developers to answer, I guess.
> > What was the command line that invoked Sed?
> The rule? Something like:
> OBJ_DIR = ./MSVC_obj
> REPLACE = sed -e 's/\(.*\)\.o: /\n$$(OBJ_DIR)\/\1.obj: /'
> SOURCES = long list of .c-files
> depend: $(DEPEND_PREREQUISETES)
> @echo 'Generating dependencies....'
> @echo $(SOURCES) > depend.tmp
> @gcc -MM $(CFLAGS) @depend.tmp | $(REPLACE) > .depend
So it seems to be related to pipes.
> > (And why in the world are you calling an MSYS Bash and Sed from a
> > MinGW Make?)
> I had an alias 'make' that pointed to 'mingw32-make'. I've had
> this for years and have had no trouble using Msys tools with
> MingW make. I understand I could get into trouble, but don't.
> So "if it works, why change it".
I got in trouble very fast, as soon as I started building using MSYS.
Then I switched to MSYS Make, and the problem were gone. The problems
lurk where Make invokes programs directly, not via the shell (which is
an MSYS Bash): in those cases, the conversion of /foo/bar into
c:/mingw/foo/bar doesn't happen, and your build is toast.
> Besides mingw32-make works lot faster than MSys' make here.
> Taking the 'make depend' above (the makefile is for WireShark; a
> huge project with 2000 src-files), MSys's stays seemingly idle for
> 20 sec before starting any 'gcc -MM' processes.
Get Make from a snapshot of MSYS, and this problem is gone, too.