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 2013/05/15 22:21:43 UTC

[lucy-commits] [3/3] git commit: refs/heads/makefile-rework - Regenerate charmonizer.c

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/b5c98ed4
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/b5c98ed4
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/b5c98ed4

Branch: refs/heads/makefile-rework
Commit: b5c98ed4e73ea91677c16907c312386b2b405c57
Parents: d79d15f
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed May 15 21:57:35 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed May 15 22:19:40 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/common/charmonizer.c |    9 +++++++--
 clownfish/runtime/common/charmonizer.c  |    9 +++++++--
 common/charmonizer.c                    |   14 +++++++++++---
 3 files changed, 25 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/b5c98ed4/clownfish/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c
index 6119e88..cdea734 100644
--- a/clownfish/compiler/common/charmonizer.c
+++ b/clownfish/compiler/common/charmonizer.c
@@ -3564,11 +3564,12 @@ chaz_MakeFile_write(chaz_MakeFile *makefile) {
 
     if (chaz_Make.is_nmake) {
         /* Inference rule for .c files. */
-        fprintf(out, ".c.obj :\n");
         if (chaz_CC_msvc_version_num()) {
+            fprintf(out, ".c.obj :\n");
             fprintf(out, "\t$(CC) /nologo $(CFLAGS) /c $< /Fo$@\n\n");
         }
         else {
+            fprintf(out, ".c.o :\n");
             fprintf(out, "\t$(CC) $(CFLAGS) -c $< -o $@\n\n");
         }
     }
@@ -4630,7 +4631,11 @@ chaz_DirManip_run(void) {
         chaz_ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "1");
     }
 
-    {
+    if (strcmp(dir_sep, "\\") == 0) {
+        chaz_ConfWriter_add_def("DIR_SEP", "\"\\\\\"");
+        chaz_ConfWriter_add_def("DIR_SEP_CHAR", "'\\\\'");
+    }
+    else {
         char scratch[5];
         sprintf(scratch, "\"%s\"", dir_sep);
         chaz_ConfWriter_add_def("DIR_SEP", scratch);

http://git-wip-us.apache.org/repos/asf/lucy/blob/b5c98ed4/clownfish/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c
index aef9a82..a0ee9d0 100644
--- a/clownfish/runtime/common/charmonizer.c
+++ b/clownfish/runtime/common/charmonizer.c
@@ -3843,11 +3843,12 @@ chaz_MakeFile_write(chaz_MakeFile *makefile) {
 
     if (chaz_Make.is_nmake) {
         /* Inference rule for .c files. */
-        fprintf(out, ".c.obj :\n");
         if (chaz_CC_msvc_version_num()) {
+            fprintf(out, ".c.obj :\n");
             fprintf(out, "\t$(CC) /nologo $(CFLAGS) /c $< /Fo$@\n\n");
         }
         else {
+            fprintf(out, ".c.o :\n");
             fprintf(out, "\t$(CC) $(CFLAGS) -c $< -o $@\n\n");
         }
     }
@@ -5000,7 +5001,11 @@ chaz_DirManip_run(void) {
         chaz_ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "1");
     }
 
-    {
+    if (strcmp(dir_sep, "\\") == 0) {
+        chaz_ConfWriter_add_def("DIR_SEP", "\"\\\\\"");
+        chaz_ConfWriter_add_def("DIR_SEP_CHAR", "'\\\\'");
+    }
+    else {
         char scratch[5];
         sprintf(scratch, "\"%s\"", dir_sep);
         chaz_ConfWriter_add_def("DIR_SEP", scratch);

http://git-wip-us.apache.org/repos/asf/lucy/blob/b5c98ed4/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index 895f677..3dfbb38 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -3843,11 +3843,12 @@ chaz_MakeFile_write(chaz_MakeFile *makefile) {
 
     if (chaz_Make.is_nmake) {
         /* Inference rule for .c files. */
-        fprintf(out, ".c.obj :\n");
         if (chaz_CC_msvc_version_num()) {
+            fprintf(out, ".c.obj :\n");
             fprintf(out, "\t$(CC) /nologo $(CFLAGS) /c $< /Fo$@\n\n");
         }
         else {
+            fprintf(out, ".c.o :\n");
             fprintf(out, "\t$(CC) $(CFLAGS) -c $< -o $@\n\n");
         }
     }
@@ -5000,7 +5001,11 @@ chaz_DirManip_run(void) {
         chaz_ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "1");
     }
 
-    {
+    if (strcmp(dir_sep, "\\") == 0) {
+        chaz_ConfWriter_add_def("DIR_SEP", "\"\\\\\"");
+        chaz_ConfWriter_add_def("DIR_SEP_CHAR", "'\\\\'");
+    }
+    else {
         char scratch[5];
         sprintf(scratch, "\"%s\"", dir_sep);
         chaz_ConfWriter_add_def("DIR_SEP", scratch);
@@ -6943,7 +6948,10 @@ S_write_makefile(struct chaz_CLIArgs *args) {
          * characters. As a work-around, delete all .obj files in BASE_DIR
          * using 'del /s /q'.
          */
-        chaz_MakeRule_add_command(clean_rule, "del /s /q $(BASE_DIR)\\*.obj");
+        scratch = chaz_Util_join("", "del /s /q ", base_dir, "\\*", obj_ext,
+                                 NULL);
+        chaz_MakeRule_add_command(clean_rule, scratch);
+        free(scratch);
     }
     else {
         chaz_MakeRule_add_rm_command(clean_rule, "$(LUCY_OBJS)");