[rtems-tools commit] Backport m4 fix from master.

Chris Johns chrisj at rtems.org
Mon Feb 22 04:19:19 UTC 2016


Module:    rtems-tools
Branch:    4.11
Commit:    e373b1080f7f8ceae2a05581c5906e6ce5d59d6f
Changeset: http://git.rtems.org/rtems-tools/commit/?id=e373b1080f7f8ceae2a05581c5906e6ce5d59d6f

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sat Feb 20 12:56:40 2016 +1100

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:




More information about the vc mailing list