You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/08/19 22:06:51 UTC
git commit: refs/heads/solaris_fixes - Regenerate charmonizer.c
Repository: lucy
Updated Branches:
refs/heads/solaris_fixes c2ef2c924 -> d6e669aa9
Regenerate charmonizer.c
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d6e669aa
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d6e669aa
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d6e669aa
Branch: refs/heads/solaris_fixes
Commit: d6e669aa99fb9e997f33b2af981ac360b93c2d16
Parents: c2ef2c9
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Aug 19 22:04:41 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Aug 19 22:04:41 2014 +0200
----------------------------------------------------------------------
common/charmonizer.c | 50 ++++++++++++++++++-----------------------------
1 file changed, 19 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/d6e669aa/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index 1582e84..64ac7b8 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -2065,7 +2065,7 @@ static struct {
} chaz_CC = {
NULL, NULL, NULL,
"", "",
- 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
NULL, NULL
};
@@ -3781,12 +3781,10 @@ struct chaz_MakeFile {
/* Static vars. */
static struct {
char *make_command;
- int is_gnu_make;
- int is_nmake;
int shell_type;
} chaz_Make = {
NULL,
- 0, 0, 0
+ 0
};
/* Detect make command.
@@ -3824,20 +3822,13 @@ chaz_Make_init(void) {
make = chaz_Make.make_command;
if (make) {
- if (strcmp(make, "make") == 0
- || strcmp(make, "gmake") == 0
- || strcmp(make, "mingw32-make") == 0
- || strcmp(make, "mingw64-make") == 0
- ) {
- /* TODO: Add a feature test for GNU make. */
- chaz_Make.is_gnu_make = 1;
- /* TODO: Feature test which shell GNU make uses on Windows. */
- chaz_Make.shell_type = CHAZ_OS_POSIX;
- }
- else if (strcmp(make, "nmake") == 0) {
- chaz_Make.is_nmake = 1;
+ if (strcmp(make, "nmake") == 0) {
chaz_Make.shell_type = CHAZ_OS_CMD_EXE;
}
+ else {
+ /* TODO: Feature test which shell make uses on Windows. */
+ chaz_Make.shell_type = CHAZ_OS_POSIX;
+ }
}
}
@@ -4380,34 +4371,31 @@ chaz_MakeRule_add_make_command(chaz_MakeRule *rule, const char *dir,
const char *target) {
char *command;
- if (chaz_Make.is_gnu_make) {
+ if (chaz_Make.shell_type == CHAZ_OS_POSIX) {
if (!target) {
- command = chaz_Util_join(" ", "$(MAKE)", "-C", dir, NULL);
+ command = chaz_Util_join("", "(cd ", dir, " && $(MAKE))", NULL);
}
else {
- command = chaz_Util_join(" ", "$(MAKE)", "-C", dir, target, NULL);
+ command = chaz_Util_join("", "(cd ", dir, " && $(MAKE) ", target,
+ ")", NULL);
}
chaz_MakeRule_add_command(rule, command);
free(command);
}
- else if (chaz_Make.is_nmake) {
- command = chaz_Util_join(" ", "cd", dir, NULL);
- chaz_MakeRule_add_command(rule, command);
- free(command);
-
+ else if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) {
if (!target) {
- chaz_MakeRule_add_command(rule, "$(MAKE) /nologo");
+ command = chaz_Util_join(" ", "pushd", dir, "&& $(MAKE) && popd",
+ NULL);
}
else {
- command = chaz_Util_join(" ", "$(MAKE) /nologo", target, NULL);
- chaz_MakeRule_add_command(rule, command);
- free(command);
+ command = chaz_Util_join(" ", "pushd", dir, "&& $(MAKE)", target,
+ "&& popd", NULL);
}
-
- chaz_MakeRule_add_command(rule, "cd $(MAKEDIR)");
+ chaz_MakeRule_add_command(rule, command);
+ free(command);
}
else {
- chaz_Util_die("Couldn't find a supported 'make' utility.");
+ chaz_Util_die("Unsupported shell type: %d", chaz_Make.shell_type);
}
}