diff options
author | Chris Johns <chrisj@rtems.org> | 2016-02-20 12:56:40 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2016-02-22 13:12:38 +1100 |
commit | e373b1080f7f8ceae2a05581c5906e6ce5d59d6f (patch) | |
tree | 6ffc2c9e15f38c27c51716614640f99f45615c5e | |
parent | be602e492a33715594008ea8d614d9c483ee4bfe (diff) |
Backport m4 fix from master.
-rw-r--r-- | rtemstoolkit/wscript | 12 |
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: |