summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-02-20 12:56:40 +1100
committerChris Johns <chrisj@rtems.org>2016-02-22 13:12:38 +1100
commite373b1080f7f8ceae2a05581c5906e6ce5d59d6f (patch)
tree6ffc2c9e15f38c27c51716614640f99f45615c5e
parentDo not change the Python os.sep setting. (diff)
downloadrtems-tools-e373b1080f7f8ceae2a05581c5906e6ce5d59d6f.tar.bz2
Backport m4 fix from master.
-rw-r--r--rtemstoolkit/wscript12
1 files changed, 3 insertions, 9 deletions
diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript
index b51456a..8e4e823 100644
--- a/rtemstoolkit/wscript
+++ b/rtemstoolkit/wscript
@@ -22,6 +22,8 @@ def configure(conf):
conf_libiberty(conf)
conf_libelf(conf)
+ conf.find_program('m4')
+
conf.check(header_name = 'sys/wait.h', features = 'c', mandatory = False)
conf.check_cc(function_name = 'kill', header_name = "signal.h",
features = 'c', mandatory = False)
@@ -139,15 +141,7 @@ def conf_libelf(conf):
def bld_libelf(bld, conf):
libelf = 'elftoolchain/libelf/'
-
- #
- # Work around the ${SRC} having Windows slashes which the MSYS m4 does not
- # understand.
- #
- if sys.platform == 'win32':
- m4_rule = 'type ${SRC} | m4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + '> ${TGT}"'
- else:
- m4_rule = 'm4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + ' ${SRC} > ${TGT}'
+ m4_rule = '${M4} -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + ' ${SRC} > ${TGT}'
if bld.env.DEST_OS == 'win32':
includes = ['win32']
else: