From e373b1080f7f8ceae2a05581c5906e6ce5d59d6f Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 20 Feb 2016 12:56:40 +1100 Subject: Backport m4 fix from master. --- rtemstoolkit/wscript | 12 +++--------- 1 file 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: -- cgit v1.2.3