Repository: lucy-clownfish Updated Branches: refs/heads/master d0b8eaee2 -> fdab168f2
Regenerate charmonizer.c for Windows fixes Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fdab168f Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fdab168f Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fdab168f Branch: refs/heads/master Commit: fdab168f23a15c5a0bae8b91abdde41f777ec889 Parents: d0b8eae Author: Nick Wellnhofer <[email protected]> Authored: Sat May 21 18:17:24 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sat May 21 18:17:24 2016 +0200 ---------------------------------------------------------------------- compiler/common/charmonizer.c | 14 +++++++------- runtime/common/charmonizer.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fdab168f/compiler/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c index ce2e5a1..11ed123 100644 --- a/compiler/common/charmonizer.c +++ b/compiler/common/charmonizer.c @@ -4506,7 +4506,7 @@ chaz_Make_detect(const char *make1, ...) { va_list args; const char *candidate; int found = 0; - const char makefile_content[] = "foo:\n\t@echo \\^foo!\n"; + const char makefile_content[] = "foo:\n\techo foo\\^bar\n"; chaz_Util_write_file("_charm_Makefile", makefile_content); /* Audition candidates. */ @@ -4532,11 +4532,11 @@ chaz_Make_audition(const char *make) { if (chaz_Util_can_open_file("_charm_foo")) { size_t len; char *content = chaz_Util_slurp_file("_charm_foo", &len); - if (strncmp(content, "\\foo!", 5) == 0) { + if (NULL != strstr(content, "foo\\bar")) { chaz_Make.shell_type = CHAZ_OS_CMD_EXE; succeeded = 1; } - else if (strncmp(content, "^foo!", 5) == 0) { + else if (NULL != strstr(content, "foo^bar")) { chaz_Make.shell_type = CHAZ_OS_POSIX; succeeded = 1; } @@ -5101,8 +5101,8 @@ chaz_MakeRule_add_rm_command(chaz_MakeRule *rule, const char *files) { command = chaz_Util_join(" ", "rm -f", files, NULL); } else if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) { - command = chaz_Util_join("", "for %i in (", files, - ") do @if exist %i del /f %i", NULL); + command = chaz_Util_join("", "for %%i in (", files, + ") do @if exist %%i del /f %%i", NULL); } else { chaz_Util_die("Unsupported shell type: %d", chaz_Make.shell_type); @@ -5120,8 +5120,8 @@ chaz_MakeRule_add_recursive_rm_command(chaz_MakeRule *rule, const char *dirs) { command = chaz_Util_join(" ", "rm -rf", dirs, NULL); } else if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) { - command = chaz_Util_join("", "for %i in (", dirs, - ") do @if exist %i rmdir /s /q %i", NULL); + command = chaz_Util_join("", "for %%i in (", dirs, + ") do @if exist %%i rmdir /s /q %%i", NULL); } else { chaz_Util_die("Unsupported shell type: %d", chaz_Make.shell_type); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fdab168f/runtime/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c index 69c5505..2430139 100644 --- a/runtime/common/charmonizer.c +++ b/runtime/common/charmonizer.c @@ -4506,7 +4506,7 @@ chaz_Make_detect(const char *make1, ...) { va_list args; const char *candidate; int found = 0; - const char makefile_content[] = "foo:\n\t@echo \\^foo!\n"; + const char makefile_content[] = "foo:\n\techo foo\\^bar\n"; chaz_Util_write_file("_charm_Makefile", makefile_content); /* Audition candidates. */ @@ -4532,11 +4532,11 @@ chaz_Make_audition(const char *make) { if (chaz_Util_can_open_file("_charm_foo")) { size_t len; char *content = chaz_Util_slurp_file("_charm_foo", &len); - if (strncmp(content, "\\foo!", 5) == 0) { + if (NULL != strstr(content, "foo\\bar")) { chaz_Make.shell_type = CHAZ_OS_CMD_EXE; succeeded = 1; } - else if (strncmp(content, "^foo!", 5) == 0) { + else if (NULL != strstr(content, "foo^bar")) { chaz_Make.shell_type = CHAZ_OS_POSIX; succeeded = 1; } @@ -5101,8 +5101,8 @@ chaz_MakeRule_add_rm_command(chaz_MakeRule *rule, const char *files) { command = chaz_Util_join(" ", "rm -f", files, NULL); } else if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) { - command = chaz_Util_join("", "for %i in (", files, - ") do @if exist %i del /f %i", NULL); + command = chaz_Util_join("", "for %%i in (", files, + ") do @if exist %%i del /f %%i", NULL); } else { chaz_Util_die("Unsupported shell type: %d", chaz_Make.shell_type); @@ -5120,8 +5120,8 @@ chaz_MakeRule_add_recursive_rm_command(chaz_MakeRule *rule, const char *dirs) { command = chaz_Util_join(" ", "rm -rf", dirs, NULL); } else if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) { - command = chaz_Util_join("", "for %i in (", dirs, - ") do @if exist %i rmdir /s /q %i", NULL); + command = chaz_Util_join("", "for %%i in (", dirs, + ") do @if exist %%i rmdir /s /q %%i", NULL); } else { chaz_Util_die("Unsupported shell type: %d", chaz_Make.shell_type);
