From d045b3141d48868d9b1ec9efba6c38da428c4c0e Mon Sep 17 00:00:00 2001 From: jasonmoxham Date: Mon, 25 Oct 2010 13:44:48 +0000 Subject: [PATCH] combine post processing step of m4 to yasm with the second part of the renaming --- configure | 31 +++++++++++++++++++++++++++---- configure.in | 33 +++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/configure b/configure index d49e9ed7..1cd3d86e 100755 --- a/configure +++ b/configure @@ -26081,6 +26081,7 @@ esac tmp_d_n_l=d""nl echo "$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary. $tmp_d_n_l Generated by configure - DO NOT EDIT. +$tmp_d_n_l This line is to help MINGW64 define(OPERATION_$tmp_fn) define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix) @@ -31038,7 +31039,24 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -# now we have created and populated the mpn dire we can rename the files +## now we have created and populated the mpn directory we can rename the files +#case $host in +#*-w64-mingw*) +# for jay in $old_gmp_srclinks; do +# jayext=`echo "$jay" | awk -F . '{print $NF}'` +# #jayext=`/bin/echo "${jay#*.}"` +# #jayext=`echo "$jay" | sed -n 's/.*\.//'` +# base=`echo "${jay%.*}"` +# if test "$jayext" = "asm"; then +# mv $jay $base.as +# fi +# done +# ;; +#*) +# ;; +#esac + +# for mingw64 post process the "m4 macros" into "yasm macros" case $host in *-w64-mingw*) for jay in $old_gmp_srclinks; do @@ -31047,10 +31065,15 @@ case $host in #jayext=`echo "$jay" | sed -n 's/.*\.//'` base=`echo "${jay%.*}"` if test "$jayext" = "asm"; then - mv $jay $base.as + got=`grep -ce " if test got == 1 ; then + cat $jay | sed s/"include(\(.*\))"/"%include \1"/ | sed s/""/"%define \1 \2"/ | sed s/""/"%define \1"/ | sed s/" else + mv $jay $base.as + fi fi done - ;; + +;; *) - ;; +;; esac + diff --git a/configure.in b/configure.in index da44eeee..e823a84b 100644 --- a/configure.in +++ b/configure.in @@ -2603,6 +2603,7 @@ DECL_$tmp_fbase (__MPN(${tmp_fbase}_init));" >>fat.h tmp_d_n_l=d""nl echo ["$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary. $tmp_d_n_l Generated by configure - DO NOT EDIT. +$tmp_d_n_l This line is to help MINGW64 define(OPERATION_$tmp_fn) define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix) @@ -3174,7 +3175,24 @@ AC_CONFIG_LINKS(yasm_mac.inc:$YASM_MAC_INC) AC_OUTPUT(Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile mpir.h:gmp-h.in) -# now we have created and populated the mpn dire we can rename the files +## now we have created and populated the mpn directory we can rename the files +#case $host in +#*-w64-mingw*) +# for jay in $old_gmp_srclinks; do +# jayext=`echo "$jay" | awk -F . '{print $NF}'` +# #jayext=`/bin/echo "${jay#*.}"` +# #jayext=`echo "$jay" | sed -n 's/.*\.//'` +# base=`echo "${jay%.*}"` +# if test "$jayext" = "asm"; then +# mv $jay $base.as +# fi +# done +# ;; +#*) +# ;; +#esac + +# for mingw64 post process the "m4 macros" into "yasm macros" case $host in *-w64-mingw*) for jay in $old_gmp_srclinks; do @@ -3183,10 +3201,17 @@ case $host in #jayext=`echo "$jay" | sed -n 's/.*\.//'` base=`echo "${jay%.*}"` if test "$jayext" = "asm"; then - mv $jay $base.as + got=`grep -ce "dnl This line is to help MINGW64" $jay` + if test got == 1 ; then + cat $jay | sed s/"include(\(.*\))"/"%include \1"/ | sed s/"define(\(.*\),\(.*\))"/"%define \1 \2"/ | sed s/"define(\(.*\))"/"%define \1"/ | sed s/"dnl\(.*\)"/"; \1"/ | sed s/ifdef.*// | sed s/"\`.*"// > $base.as + else + mv $jay $base.as + fi fi done - ;; + +;; *) - ;; +;; esac +