diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-01-25 02:35:28 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-01-25 02:35:28 +0000 |
| commit | d71d3ede34f22c52442ad7c9a35cba88d3660c15 (patch) | |
| tree | 64e2fd023972cf2a84c7854be3ab4a943c07207d /share | |
| parent | afde278cf7994f8c8c54095adebb2b0b00f41a17 (diff) | |
| download | build-d71d3ede34f22c52442ad7c9a35cba88d3660c15.tar.gz build-d71d3ede34f22c52442ad7c9a35cba88d3660c15.tar.bz2 build-d71d3ede34f22c52442ad7c9a35cba88d3660c15.tar.xz build-d71d3ede34f22c52442ad7c9a35cba88d3660c15.zip | |
Corrected the rules to not assume that files are in a subdirectory, the code
makes a little more sense now as well.
Diffstat (limited to 'share')
| -rw-r--r-- | share/autoinclude/general-rules.bld | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/share/autoinclude/general-rules.bld b/share/autoinclude/general-rules.bld index 94b06eb..0b8f6e3 100644 --- a/share/autoinclude/general-rules.bld +++ b/share/autoinclude/general-rules.bld | |||
| @@ -33,28 +33,26 @@ function cppToObj() | |||
| 33 | { | 33 | { |
| 34 | if OBJ_DIR == null then | 34 | if OBJ_DIR == null then |
| 35 | { | 35 | { |
| 36 | DIR = INPUT.dirName(); | 36 | return INPUT.regex("\\.cpp$", ".o"); |
| 37 | } | 37 | } |
| 38 | else | 38 | else |
| 39 | { | 39 | { |
| 40 | DIR = OBJ_DIR; | 40 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".o"); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | return DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".o"); | ||
| 44 | } | 43 | } |
| 45 | 44 | ||
| 46 | function cToObj() | 45 | function cToObj() |
| 47 | { | 46 | { |
| 48 | if OBJ_DIR == null then | 47 | if OBJ_DIR == null then |
| 49 | { | 48 | { |
| 50 | DIR = INPUT.dirName(); | 49 | return INPUT.regex("\\.c$", ".o"); |
| 51 | } | 50 | } |
| 52 | else | 51 | else |
| 53 | { | 52 | { |
| 54 | DIR = OBJ_DIR; | 53 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.c$", ".o"); |
| 55 | } | 54 | } |
| 56 | 55 | ||
| 57 | return DIR + "/" + INPUT.fileName().regex("\\.c$", ".o"); | ||
| 58 | } | 56 | } |
| 59 | 57 | ||
| 60 | rule "exe" | 58 | rule "exe" |
