aboutsummaryrefslogtreecommitdiff
path: root/share/autoinclude/general-rules.bld
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/autoinclude/general-rules.bld13
1 files changed, 6 insertions, 7 deletions
diff --git a/share/autoinclude/general-rules.bld b/share/autoinclude/general-rules.bld
index 9f905a6..94b06eb 100644
--- a/share/autoinclude/general-rules.bld
+++ b/share/autoinclude/general-rules.bld
@@ -40,7 +40,7 @@ function cppToObj()
40 DIR = OBJ_DIR; 40 DIR = OBJ_DIR;
41 } 41 }
42 42
43 return DIR + "/" + INPUT.fileName().replace(".cpp", ".o"); 43 return DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".o");
44} 44}
45 45
46function cToObj() 46function cToObj()
@@ -54,7 +54,7 @@ function cToObj()
54 DIR = OBJ_DIR; 54 DIR = OBJ_DIR;
55 } 55 }
56 56
57 return DIR + "/" + INPUT.fileName().replace(".c", ".o"); 57 return DIR + "/" + INPUT.fileName().regex("\\.c$", ".o");
58} 58}
59 59
60rule "exe" 60rule "exe"
@@ -100,7 +100,6 @@ rule "c"
100{ 100{
101 input "*.c"; 101 input "*.c";
102 output INPUT.cToObj(); 102 output INPUT.cToObj();
103// output replace(".c", ".o");
104 requires getMakeDeps("${CC} ${CFLAGS} -M ${INPUT}"); 103 requires getMakeDeps("${CC} ${CFLAGS} -M ${INPUT}");
105 profile "build" 104 profile "build"
106 { 105 {
@@ -111,10 +110,10 @@ rule "c"
111rule "bison" 110rule "bison"
112{ 111{
113 input "*.y"; 112 input "*.y";
114 output [INPUT.replace(".y", ".tab.c"), INPUT.replace(".y", ".tab.h")]; 113 output [INPUT.regex("\\.y$", ".tab.c"), INPUT.regex("\\.y$", ".tab.h")];
115 profile "build" 114 profile "build"
116 { 115 {
117 BASE = INPUT.replace(".y", ""); 116 BASE = INPUT.regex("\\.y", "");
118 execute("${BISON} -b${BASE} ${INPUT}"); 117 execute("${BISON} -b${BASE} ${INPUT}");
119 // if you add a -v bison will produce a .output file 118 // if you add a -v bison will produce a .output file
120 } 119 }
@@ -123,8 +122,8 @@ rule "bison"
123rule "flex" 122rule "flex"
124{ 123{
125 input "*.l"; 124 input "*.l";
126 output INPUT.replace(".l", ".yy.c"); 125 output INPUT.regex("\\.l$", ".yy.c");
127 output INPUT.replace(".l", ".yy.h"); 126 output INPUT.regex("\\.l$", ".yy.h");
128 profile "build" 127 profile "build"
129 { 128 {
130 execute("${FLEX} ${FLEXFLAGS} ${INPUT}"); 129 execute("${FLEX} ${FLEXFLAGS} ${INPUT}");