Ignore:
Timestamp:
Sep 19, 2006, 6:29:18 AM (19 years ago)
Author:
bird
Message:

o A real attempt at fixing the double quoting problem on windows. ash seems to want a

space between a double quote enclosing the last argument on the commandline and the
double quote enclosing the commandline (the -c argument). Also, defined HAVE_CYGWIN_SHELL.

o Fixed a newline escape problem when using batch_mode_shell on windows with kmk_ash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/Makefile.kmk

    r533 r535  
    3030        CONFIG_WITH_VALUE_LENGTH \
    3131        CONFIG_WITH_COMPARE
     32kmk_DEFS.win32 = HAVE_CYGWIN_SHELL
     33kmk_DEFS.win64 = HAVE_CYGWIN_SHELL
    3234
    3335kmk_SOURCES = \
     
    272274        echo "4"
    273275
    274 # shell double and single quoting check.
     276
     277#
     278# Shell execution tests.
     279#
     280test_shell: test_shell_quoting test_shell_newline
     281
     282# shell double and single quoting check (was busted on windows in 3.81).
    275283test_shell_quoting:
     284        $(ECHO_EXT) "double quoted sTrInG"
    276285        $(ECHO_EXT) "double quoted sTrInG" | $(SED_EXT) -e "s/sTrInG/string/g"
    277286        $(ECHO_EXT) 'single quoted sTrInG' | $(SED_EXT) -e 's/sTrInG/string/g'
    278287        $(ECHO) "This string should not be printed with double quotes."
    279288        $(ECHO) 'This string should not be printed with single quotes.'
     289
     290# when using batch mode shell, the newline got escaped twice and spoiling everything.
     291test_shell_newline:
     292        $(ECHO_EXT) "foo foo foo" | $(SED_EXT) -e \
     293                's/foo/$@/' -e \
     294                's/foo/works/' \
     295                -e 's/foo/\!/'
     296
Note: See TracChangeset for help on using the changeset viewer.