lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [2/3] git commit: refs/heads/makefile-rework - Fix object extension for GCC/nmake
Date Wed, 15 May 2013 20:21:42 GMT
Fix object extension for GCC/nmake


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d79d15fc
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d79d15fc
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d79d15fc

Branch: refs/heads/makefile-rework
Commit: d79d15fc69b58d73748948701f6a70f0ef887670
Parents: d7f3fa8
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Wed May 15 22:13:02 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Wed May 15 22:19:40 2013 +0200

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Core/Make.c |    3 ++-
 common/charmonizer.main                 |    5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d79d15fc/charmonizer/src/Charmonizer/Core/Make.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Make.c b/charmonizer/src/Charmonizer/Core/Make.c
index d15751d..2fbde93 100644
--- a/charmonizer/src/Charmonizer/Core/Make.c
+++ b/charmonizer/src/Charmonizer/Core/Make.c
@@ -443,11 +443,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");
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/d79d15fc/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 5b8519c..950b981 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -361,7 +361,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)");


Mime
View raw message