aboutsummaryrefslogtreecommitdiff
path: root/share/autoinclude
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-01-07 00:36:55 +0000
committerMike Buland <eichlan@xagasoft.com>2010-01-07 00:36:55 +0000
commitcbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e (patch)
tree774564c97de455c40428ae5fa23638893fd1bbc0 /share/autoinclude
parent3c7e81d3baba06cb1bf37de84aeaa6cad277652a (diff)
downloadbuild-cbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e.tar.gz
build-cbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e.tar.bz2
build-cbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e.tar.xz
build-cbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e.zip
Updated the general rules to use the new regex function, they're safer now,
and everything works. Unfortunately, with this release, you'll have to rebuild with the shell script...
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}");