[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

no batch patch

From: grischka
Subject: no batch patch
Date: Tue, 2 May 2006 21:53:16 +0200

This is a patch that replaces the usage of batch files in favor 
of direct invokation of the command interpreter on windows. 
It is a 'standalone' implementation of 
that takes advantage of the fact that unlike on other systems
the os function to invoke the subprocess takes a flat line anyway.

Short summary:

- New 'construct_command_argv_internal()' (jobs.c) for WINDOWS32.
  Its supposed to handle these cases:

    * direct commands
      -> line is passed to CreateProcess as is.

    * comspec shell
      -> line is passed as: %COMSPEC% /c line here ...

    * sh shell
      -> line is quoted and passed as: sh -c "line here ..."
      Within the line " and \ are escaped with \

- New 'make_command_line()' (win32\sub_proc.c), as 'simplistic' as
  5 lines can be ;)

- Presets for the "SHELL" variable (main.c, variable.c) were removed.
  Instead the decision is made in place. (Should be fine for msys that
  sets "SHELL" in the environment, I hope cygwin does too)

After all, I cant promise that everthing will go with no further
adjustments, this would be subject of testing.

One difference I've seen so far, but since the new version looked
better to me, I left it:

--- makefile:
SHELL = sh
    echo "!" back\\slash "!"

--- cvs make:
echo "!" back\\slash "!"
! backslash !

--- patched make:
echo "!" back\\slash "!"
! back\slash !

--- grischka

Attachment: nobatch.diff.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]