Hello,

I was posting this already in help-make, and Paul Smith advised me to try it 
here. So first my original posting and then a part of the answer of Paul which 
is related to UNIX. Maybe someone knows how things are with WinXP.

my original posting:
I would like to start a program by using a make rule. I know that compilers and 
so on are all programs. The ones that I want to start do not finish and so 
don't send an error code back and as much as I have seen make then just waits 
for the error code to come. Here is an example:

my_rule:
    program1.exe arg1 arg2
    program2.exe arg1 arg2

This should start program1 and leave it running and then start program2 and 
leave it running.
But what I see is this:
program1 starts and nothing else happens. When I manually stop program1 then 
program2 starts.

Another very good thing would be to have a rule like this:

my_rule:
    stop program1
    stop program2

If they are not running it should do nothing, maybe the '-' prefix will do this?

(using make 3.81 under WinXP)


part of Pauls answer:
There is no way for make to not wait for a program.

If you had a UNIX system with a normal shell, you could put the process
into the background, like this:

 foo:
  program1 &
  program2 &

(the "&" tells the shell to put the program into the background).  You
mentioned you're using Windows, but I don't know if you're using Cygwin
(which has, I believe, a UNIX-style shell) or MingW or whatever.  I
don't know how to put a program into the background on Windows.


I don't use Cygwin, as much as I know my GNU stuff is based on MinGW. But I am 
not an expert on this.

Thank you for any help

Martin
_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to