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/01/14 20:21:22 UTC

[lucy-commits] [36/50] git commit: Eliminate Makefile variables for file extensions

Eliminate Makefile variables for file extensions


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

Branch: refs/heads/master
Commit: 4ed16e2f3c86dad5d5b3bdc2879d4bef10304c28
Parents: 8462bc9
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed May 15 00:28:41 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed May 15 19:13:54 2013 +0200

----------------------------------------------------------------------
 src/Charmonizer/Core/Make.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/4ed16e2f/src/Charmonizer/Core/Make.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/Make.c b/src/Charmonizer/Core/Make.c
index b3aba56..d15751d 100644
--- a/src/Charmonizer/Core/Make.c
+++ b/src/Charmonizer/Core/Make.c
@@ -169,6 +169,9 @@ chaz_Make_audition(const char *make) {
 chaz_MakeFile*
 chaz_MakeFile_new() {
     chaz_MakeFile *makefile = (chaz_MakeFile*)malloc(sizeof(chaz_MakeFile));
+    const char    *exe_ext  = chaz_OS_exe_ext();
+    const char    *obj_ext  = chaz_CC_obj_ext();
+    char *generated;
 
     makefile->vars = (chaz_MakeVar**)malloc(sizeof(chaz_MakeVar*));
     makefile->vars[0] = NULL;
@@ -181,10 +184,11 @@ chaz_MakeFile_new() {
     makefile->clean     = S_new_rule("clean", NULL);
     makefile->distclean = S_new_rule("distclean", "clean");
 
-    chaz_MakeRule_add_rm_command(makefile->distclean,
-                                 "charmonizer$(EXE_EXT) charmonizer$(OBJ_EXT)"
-                                 " charmony.h Makefile");
+    generated = chaz_Util_join("", "charmonizer", exe_ext, " charmonizer",
+                               obj_ext, " charmony.h Makefile", NULL);
+    chaz_MakeRule_add_rm_command(makefile->distclean, generated);
 
+    free(generated);
     return makefile;
 }