[m-rev.] diff: fix namespace cleanliness check on MinGW64

Julien Fischer jfischer at opturion.com
Wed Apr 3 13:37:00 AEDT 2013


Fix the namespace cleanliness check on MinGW64.

configure.ac:
	Check for the host specific version of the nm tool.
	For MinGW64 we need to use the MinGW64 version, not
	the MinGW32 version (i.e. x86_64-w64-mingw32-nm, not
	nm).

Mmake.common.in:
	Use the host specific version of the nm tool to list
	external symbols in object files.

Julien.

diff --git a/Mmake.common.in b/Mmake.common.in
index f8e2395..596705e 100644
--- a/Mmake.common.in
+++ b/Mmake.common.in
@@ -218,6 +218,7 @@ PDFTEX=@PDFTEX@
 MAKEINFO=@MAKEINFO@
 LYNX=@LYNX@
 PERL=@PERL@
+NM=@NM@

 #-----------------------------------------------------------------------------#

@@ -376,7 +377,7 @@ HEADER_CLEAN_FILTER = \
 # do not start with `MR_', `mercury_', or `entry_'.

 %.obj_check: %
-	nm -g $< | awk '$$1 != "U" { print $$3; }' | \
+	$(NM) -g $< | awk '$$1 != "U" { print $$3; }' | \
 		grep -v $(OBJ_PREFIX_EXPRS) | sort -u > $@
 	@if cmp -s /dev/null $@; then \
 		true; \
diff --git a/configure.ac b/configure.ac
index 64d91e7..87a0adc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1079,6 +1079,8 @@ else
     esac
 fi

+AC_CHECK_TOOL([NM], [nm], [nm])
+
 AC_SUBST(RANLIBFLAGS)
 AC_SUBST(OBJFILE_OPT)
 AC_SUBST(EXEFILE_OPT)



More information about the reviews mailing list