summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL3
-rw-r--r--Makefile.am116
-rw-r--r--NEWS2
-rw-r--r--README16
-rw-r--r--TODO2
-rw-r--r--acinclude.m43
-rw-r--r--configure.ac (renamed from configure.in)2
-rw-r--r--doc/FAQ.html (renamed from FAQ.html)0
-rw-r--r--doc/Makefile.am18
-rw-r--r--doc/README.dev (renamed from README.dev)70
-rw-r--r--doc/algorithm2e.sty (renamed from algorithm2e.sty)0
-rw-r--r--doc/algorithms.bib (renamed from algorithms.bib)0
-rw-r--r--doc/algorithms.tex (renamed from algorithms.tex)0
-rw-r--r--doc/faq.xsl (renamed from faq.xsl)0
-rw-r--r--doc/fdl.texi (renamed from fdl.texi)0
-rw-r--r--doc/mpfr.texi (renamed from mpfr.texi)7
-rwxr-xr-xdoc/update-faq (renamed from update-faq)0
-rw-r--r--other/cputime.h (renamed from cputime.h)0
-rw-r--r--other/div-short.c (renamed from div-short.c)0
-rwxr-xr-xreplace_all10
-rw-r--r--src/Makefile.am87
-rw-r--r--src/abort_prec_max.c (renamed from abort_prec_max.c)0
-rw-r--r--src/acos.c (renamed from acos.c)0
-rw-r--r--src/acosh.c (renamed from acosh.c)0
-rw-r--r--src/add.c (renamed from add.c)0
-rw-r--r--src/add1.c (renamed from add1.c)0
-rw-r--r--src/add1sp.c (renamed from add1sp.c)0
-rw-r--r--src/add_d.c (renamed from add_d.c)0
-rw-r--r--src/add_ui.c (renamed from add_ui.c)0
-rw-r--r--src/agm.c (renamed from agm.c)0
-rw-r--r--src/ai.c (renamed from ai.c)0
-rw-r--r--src/asin.c (renamed from asin.c)0
-rw-r--r--src/asinh.c (renamed from asinh.c)0
-rw-r--r--src/atan.c (renamed from atan.c)0
-rw-r--r--src/atan2.c (renamed from atan2.c)0
-rw-r--r--src/atanh.c (renamed from atanh.c)0
-rw-r--r--src/bernoulli.c (renamed from bernoulli.c)0
-rw-r--r--src/buildopt.c (renamed from buildopt.c)0
-rw-r--r--src/cache.c (renamed from cache.c)0
-rw-r--r--src/cbrt.c (renamed from cbrt.c)0
-rw-r--r--src/check.c (renamed from check.c)0
-rw-r--r--src/clear.c (renamed from clear.c)0
-rw-r--r--src/clears.c (renamed from clears.c)0
-rw-r--r--src/cmp.c (renamed from cmp.c)0
-rw-r--r--src/cmp2.c (renamed from cmp2.c)0
-rw-r--r--src/cmp_abs.c (renamed from cmp_abs.c)0
-rw-r--r--src/cmp_d.c (renamed from cmp_d.c)0
-rw-r--r--src/cmp_ld.c (renamed from cmp_ld.c)0
-rw-r--r--src/cmp_si.c (renamed from cmp_si.c)0
-rw-r--r--src/cmp_ui.c (renamed from cmp_ui.c)0
-rw-r--r--src/comparisons.c (renamed from comparisons.c)0
-rw-r--r--src/const_catalan.c (renamed from const_catalan.c)0
-rw-r--r--src/const_euler.c (renamed from const_euler.c)0
-rw-r--r--src/const_log2.c (renamed from const_log2.c)0
-rw-r--r--src/const_pi.c (renamed from const_pi.c)0
-rw-r--r--src/constant.c (renamed from constant.c)0
-rw-r--r--src/copysign.c (renamed from copysign.c)0
-rw-r--r--src/cos.c (renamed from cos.c)0
-rw-r--r--src/cosh.c (renamed from cosh.c)0
-rw-r--r--src/cot.c (renamed from cot.c)0
-rw-r--r--src/coth.c (renamed from coth.c)0
-rw-r--r--src/csc.c (renamed from csc.c)0
-rw-r--r--src/csch.c (renamed from csch.c)0
-rw-r--r--src/d_div.c (renamed from d_div.c)0
-rw-r--r--src/d_sub.c (renamed from d_sub.c)0
-rw-r--r--src/digamma.c (renamed from digamma.c)0
-rw-r--r--src/dim.c (renamed from dim.c)0
-rw-r--r--src/div.c (renamed from div.c)0
-rw-r--r--src/div_2exp.c (renamed from div_2exp.c)0
-rw-r--r--src/div_2si.c (renamed from div_2si.c)0
-rw-r--r--src/div_2ui.c (renamed from div_2ui.c)0
-rw-r--r--src/div_d.c (renamed from div_d.c)0
-rw-r--r--src/div_ui.c (renamed from div_ui.c)0
-rw-r--r--src/dump.c (renamed from dump.c)0
-rw-r--r--src/eint.c (renamed from eint.c)0
-rw-r--r--src/eq.c (renamed from eq.c)0
-rw-r--r--src/erf.c (renamed from erf.c)0
-rw-r--r--src/erfc.c (renamed from erfc.c)0
-rw-r--r--src/exceptions.c (renamed from exceptions.c)0
-rw-r--r--src/exp.c (renamed from exp.c)0
-rw-r--r--src/exp10.c (renamed from exp10.c)0
-rw-r--r--src/exp2.c (renamed from exp2.c)0
-rw-r--r--src/exp3.c (renamed from exp3.c)0
-rw-r--r--src/exp_2.c (renamed from exp_2.c)0
-rw-r--r--src/expm1.c (renamed from expm1.c)0
-rw-r--r--src/extract.c (renamed from extract.c)0
-rw-r--r--src/factorial.c (renamed from factorial.c)0
-rw-r--r--src/fits_intmax.c (renamed from fits_intmax.c)0
-rw-r--r--src/fits_s.h (renamed from fits_s.h)0
-rw-r--r--src/fits_sint.c (renamed from fits_sint.c)0
-rw-r--r--src/fits_slong.c (renamed from fits_slong.c)0
-rw-r--r--src/fits_sshort.c (renamed from fits_sshort.c)0
-rw-r--r--src/fits_u.h (renamed from fits_u.h)0
-rw-r--r--src/fits_uint.c (renamed from fits_uint.c)0
-rw-r--r--src/fits_uintmax.c (renamed from fits_uintmax.c)0
-rw-r--r--src/fits_ulong.c (renamed from fits_ulong.c)0
-rw-r--r--src/fits_ushort.c (renamed from fits_ushort.c)0
-rw-r--r--src/fma.c (renamed from fma.c)0
-rw-r--r--src/fms.c (renamed from fms.c)0
-rw-r--r--src/frac.c (renamed from frac.c)0
-rw-r--r--src/free_cache.c (renamed from free_cache.c)0
-rw-r--r--src/gamma.c (renamed from gamma.c)0
-rw-r--r--src/gammaonethird.c (renamed from gammaonethird.c)0
-rw-r--r--src/gen_inverse.h (renamed from gen_inverse.h)0
-rw-r--r--src/get_d.c (renamed from get_d.c)0
-rw-r--r--src/get_d64.c (renamed from get_d64.c)0
-rw-r--r--src/get_exp.c (renamed from get_exp.c)0
-rw-r--r--src/get_f.c (renamed from get_f.c)0
-rw-r--r--src/get_flt.c (renamed from get_flt.c)0
-rw-r--r--src/get_ld.c (renamed from get_ld.c)0
-rw-r--r--src/get_si.c (renamed from get_si.c)0
-rw-r--r--src/get_sj.c (renamed from get_sj.c)0
-rw-r--r--src/get_str.c (renamed from get_str.c)0
-rw-r--r--src/get_ui.c (renamed from get_ui.c)0
-rw-r--r--src/get_uj.c (renamed from get_uj.c)0
-rw-r--r--src/get_z.c (renamed from get_z.c)0
-rw-r--r--src/get_z_exp.c (renamed from get_z_exp.c)0
-rw-r--r--src/gmp_op.c (renamed from gmp_op.c)0
-rw-r--r--src/hypot.c (renamed from hypot.c)0
-rw-r--r--src/ieee_floats.h (renamed from ieee_floats.h)0
-rw-r--r--src/init.c (renamed from init.c)0
-rw-r--r--src/init2.c (renamed from init2.c)0
-rw-r--r--src/inits.c (renamed from inits.c)0
-rw-r--r--src/inits2.c (renamed from inits2.c)0
-rw-r--r--src/inp_str.c (renamed from inp_str.c)0
-rw-r--r--src/int_ceil_log2.c (renamed from int_ceil_log2.c)0
-rw-r--r--src/isinf.c (renamed from isinf.c)0
-rw-r--r--src/isinteger.c (renamed from isinteger.c)0
-rw-r--r--src/isnan.c (renamed from isnan.c)0
-rw-r--r--src/isnum.c (renamed from isnum.c)0
-rw-r--r--src/isqrt.c (renamed from isqrt.c)0
-rw-r--r--src/isregular.c (renamed from isregular.c)0
-rw-r--r--src/iszero.c (renamed from iszero.c)0
-rw-r--r--src/jn.c (renamed from jn.c)0
-rw-r--r--src/jyn_asympt.c (renamed from jyn_asympt.c)0
-rw-r--r--src/li2.c (renamed from li2.c)0
-rw-r--r--src/lngamma.c (renamed from lngamma.c)0
-rw-r--r--src/log.c (renamed from log.c)0
-rw-r--r--src/log10.c (renamed from log10.c)0
-rw-r--r--src/log1p.c (renamed from log1p.c)0
-rw-r--r--src/log2.c (renamed from log2.c)0
-rw-r--r--src/logging.c (renamed from logging.c)0
-rw-r--r--src/min_prec.c (renamed from min_prec.c)0
-rw-r--r--src/minmax.c (renamed from minmax.c)0
-rw-r--r--src/modf.c (renamed from modf.c)0
-rw-r--r--src/mp_clz_tab.c (renamed from mp_clz_tab.c)0
-rw-r--r--src/mparam_h.in (renamed from mparam_h.in)0
-rw-r--r--src/mpf2mpfr.h (renamed from mpf2mpfr.h)0
-rw-r--r--src/mpfr-gmp.c (renamed from mpfr-gmp.c)0
-rw-r--r--src/mpfr-gmp.h (renamed from mpfr-gmp.h)0
-rw-r--r--src/mpfr-impl.h (renamed from mpfr-impl.h)0
-rw-r--r--src/mpfr-longlong.h (renamed from mpfr-longlong.h)0
-rw-r--r--src/mpfr-thread.h (renamed from mpfr-thread.h)0
-rw-r--r--src/mpfr.h (renamed from mpfr.h)0
-rw-r--r--src/mpn_exp.c (renamed from mpn_exp.c)0
-rw-r--r--src/mul.c (renamed from mul.c)0
-rw-r--r--src/mul_2exp.c (renamed from mul_2exp.c)0
-rw-r--r--src/mul_2si.c (renamed from mul_2si.c)0
-rw-r--r--src/mul_2ui.c (renamed from mul_2ui.c)0
-rw-r--r--src/mul_d.c (renamed from mul_d.c)0
-rw-r--r--src/mul_ui.c (renamed from mul_ui.c)0
-rw-r--r--src/mulders.c (renamed from mulders.c)0
-rw-r--r--src/neg.c (renamed from neg.c)0
-rw-r--r--src/next.c (renamed from next.c)0
-rw-r--r--src/out_str.c (renamed from out_str.c)0
-rw-r--r--src/pow.c (renamed from pow.c)0
-rw-r--r--src/pow_si.c (renamed from pow_si.c)0
-rw-r--r--src/pow_ui.c (renamed from pow_ui.c)0
-rw-r--r--src/pow_z.c (renamed from pow_z.c)0
-rw-r--r--src/powerof2.c (renamed from powerof2.c)0
-rw-r--r--src/print_raw.c (renamed from print_raw.c)0
-rw-r--r--src/print_rnd_mode.c (renamed from print_rnd_mode.c)0
-rw-r--r--src/printf.c (renamed from printf.c)0
-rw-r--r--src/rec_sqrt.c (renamed from rec_sqrt.c)0
-rw-r--r--src/reldiff.c (renamed from reldiff.c)0
-rw-r--r--src/rem1.c (renamed from rem1.c)0
-rw-r--r--src/rint.c (renamed from rint.c)0
-rw-r--r--src/root.c (renamed from root.c)0
-rw-r--r--src/round_near_x.c (renamed from round_near_x.c)0
-rw-r--r--src/round_p.c (renamed from round_p.c)0
-rw-r--r--src/round_prec.c (renamed from round_prec.c)0
-rw-r--r--src/round_raw_generic.c (renamed from round_raw_generic.c)0
-rw-r--r--src/scale2.c (renamed from scale2.c)0
-rw-r--r--src/sec.c (renamed from sec.c)0
-rw-r--r--src/sech.c (renamed from sech.c)0
-rw-r--r--src/set.c (renamed from set.c)0
-rw-r--r--src/set_d.c (renamed from set_d.c)0
-rw-r--r--src/set_d64.c (renamed from set_d64.c)0
-rw-r--r--src/set_dfl_prec.c (renamed from set_dfl_prec.c)0
-rw-r--r--src/set_exp.c (renamed from set_exp.c)0
-rw-r--r--src/set_f.c (renamed from set_f.c)0
-rw-r--r--src/set_flt.c (renamed from set_flt.c)0
-rw-r--r--src/set_inf.c (renamed from set_inf.c)0
-rw-r--r--src/set_ld.c (renamed from set_ld.c)0
-rw-r--r--src/set_nan.c (renamed from set_nan.c)0
-rw-r--r--src/set_prc_raw.c (renamed from set_prc_raw.c)0
-rw-r--r--src/set_prec.c (renamed from set_prec.c)0
-rw-r--r--src/set_q.c (renamed from set_q.c)0
-rw-r--r--src/set_rnd.c (renamed from set_rnd.c)0
-rw-r--r--src/set_si.c (renamed from set_si.c)0
-rw-r--r--src/set_si_2exp.c (renamed from set_si_2exp.c)0
-rw-r--r--src/set_sj.c (renamed from set_sj.c)0
-rw-r--r--src/set_str.c (renamed from set_str.c)0
-rw-r--r--src/set_str_raw.c (renamed from set_str_raw.c)0
-rw-r--r--src/set_ui.c (renamed from set_ui.c)0
-rw-r--r--src/set_ui_2exp.c (renamed from set_ui_2exp.c)0
-rw-r--r--src/set_uj.c (renamed from set_uj.c)0
-rw-r--r--src/set_z.c (renamed from set_z.c)0
-rw-r--r--src/set_z_exp.c (renamed from set_z_exp.c)0
-rw-r--r--src/set_zero.c (renamed from set_zero.c)0
-rw-r--r--src/setmax.c (renamed from setmax.c)0
-rw-r--r--src/setmin.c (renamed from setmin.c)0
-rw-r--r--src/setsign.c (renamed from setsign.c)0
-rw-r--r--src/sgn.c (renamed from sgn.c)0
-rw-r--r--src/si_op.c (renamed from si_op.c)0
-rw-r--r--src/signbit.c (renamed from signbit.c)0
-rw-r--r--src/sin.c (renamed from sin.c)0
-rw-r--r--src/sin_cos.c (renamed from sin_cos.c)0
-rw-r--r--src/sinh.c (renamed from sinh.c)0
-rw-r--r--src/sinh_cosh.c (renamed from sinh_cosh.c)0
-rw-r--r--src/sqr.c (renamed from sqr.c)0
-rw-r--r--src/sqrt.c (renamed from sqrt.c)0
-rw-r--r--src/sqrt_ui.c (renamed from sqrt_ui.c)0
-rw-r--r--src/stack_interface.c (renamed from stack_interface.c)0
-rw-r--r--src/strtofr.c (renamed from strtofr.c)0
-rw-r--r--src/sub.c (renamed from sub.c)0
-rw-r--r--src/sub1.c (renamed from sub1.c)0
-rw-r--r--src/sub1sp.c (renamed from sub1sp.c)0
-rw-r--r--src/sub_d.c (renamed from sub_d.c)0
-rw-r--r--src/sub_ui.c (renamed from sub_ui.c)0
-rw-r--r--src/subnormal.c (renamed from subnormal.c)0
-rw-r--r--src/sum.c (renamed from sum.c)0
-rw-r--r--src/swap.c (renamed from swap.c)0
-rw-r--r--src/tan.c (renamed from tan.c)0
-rw-r--r--src/tanh.c (renamed from tanh.c)0
-rw-r--r--src/uceil_exp2.c (renamed from uceil_exp2.c)0
-rw-r--r--src/uceil_log2.c (renamed from uceil_log2.c)0
-rw-r--r--src/ufloor_log2.c (renamed from ufloor_log2.c)0
-rw-r--r--src/ui_div.c (renamed from ui_div.c)0
-rw-r--r--src/ui_pow.c (renamed from ui_pow.c)0
-rw-r--r--src/ui_pow_ui.c (renamed from ui_pow_ui.c)0
-rw-r--r--src/ui_sub.c (renamed from ui_sub.c)0
-rw-r--r--src/urandom.c (renamed from urandom.c)0
-rw-r--r--src/urandomb.c (renamed from urandomb.c)0
-rw-r--r--src/vasprintf.c (renamed from vasprintf.c)0
-rw-r--r--src/version.c (renamed from version.c)0
-rw-r--r--src/volatile.c (renamed from volatile.c)0
-rw-r--r--src/yn.c (renamed from yn.c)0
-rw-r--r--src/zeta.c (renamed from zeta.c)0
-rw-r--r--src/zeta_ui.c (renamed from zeta_ui.c)0
-rw-r--r--tests/Makefile.am8
-rwxr-xr-xtools/check_inits_clears (renamed from check_inits_clears)3
-rwxr-xr-xtools/coverage (renamed from coverage)0
-rwxr-xr-xtools/get_patches.sh (renamed from get_patches.sh)0
-rw-r--r--tools/mbench/Makefile (renamed from mbench/Makefile)0
-rw-r--r--tools/mbench/README (renamed from mbench/README)0
-rw-r--r--tools/mbench/generate.c (renamed from mbench/generate.c)0
-rw-r--r--tools/mbench/mfv5-arprec.cc (renamed from mbench/mfv5-arprec.cc)0
-rw-r--r--tools/mbench/mfv5-cln.cc (renamed from mbench/mfv5-cln.cc)0
-rw-r--r--tools/mbench/mfv5-crlibm.cc (renamed from mbench/mfv5-crlibm.cc)0
-rw-r--r--tools/mbench/mfv5-libc.cc (renamed from mbench/mfv5-libc.cc)0
-rw-r--r--tools/mbench/mfv5-lidia.cc (renamed from mbench/mfv5-lidia.cc)0
-rw-r--r--tools/mbench/mfv5-mpf.cc (renamed from mbench/mfv5-mpf.cc)0
-rw-r--r--tools/mbench/mfv5-mpfr.cc (renamed from mbench/mfv5-mpfr.cc)0
-rw-r--r--tools/mbench/mfv5-ntl.cc (renamed from mbench/mfv5-ntl.cc)0
-rw-r--r--tools/mbench/mfv5-pari.cc (renamed from mbench/mfv5-pari.cc)0
-rw-r--r--tools/mbench/mfv5-void.cc (renamed from mbench/mfv5-void.cc)0
-rw-r--r--tools/mbench/mfv5.cc (renamed from mbench/mfv5.cc)0
-rw-r--r--tools/mbench/mfv5.h (renamed from mbench/mfv5.h)0
-rw-r--r--tools/mbench/mpfr-gfx.c (renamed from mbench/mpfr-gfx.c)0
-rw-r--r--tools/mbench/mpfr-v4.c (renamed from mbench/mpfr-v4.c)0
-rw-r--r--tools/mbench/mpfr-v6.c (renamed from mbench/mpfr-v6.c)0
-rw-r--r--tools/mbench/timp.h (renamed from mbench/timp.h)0
-rwxr-xr-xtools/mpfrlint (renamed from mpfrlint)52
-rwxr-xr-xtools/nightly-test (renamed from nightly-test)0
-rwxr-xr-xtools/update-patchv46
-rwxr-xr-xtools/update-version (renamed from update-version)19
-rw-r--r--tune/Makefile.am38
-rw-r--r--tune/bidimensional_sample.c (renamed from bidimensional_sample.c)0
-rw-r--r--tune/speed.c (renamed from speed.c)0
-rw-r--r--tune/tuneup.c (renamed from tuneup.c)0
-rwxr-xr-xupdate-patchv17
282 files changed, 294 insertions, 225 deletions
diff --git a/INSTALL b/INSTALL
index deea67a24..c2fcca373 100644
--- a/INSTALL
+++ b/INSTALL
@@ -108,7 +108,8 @@ install recent versions of some utilities such as texinfo.
* Type "make html" to produce the documentation in the HTML format
(in several pages); if you want only one output HTML file, then
- type "makeinfo --html --no-split mpfr.texi" instead.
+ type "makeinfo --html --no-split mpfr.texi" from the doc directory
+ instead.
Building MPFR with internal GMP header files
diff --git a/Makefile.am b/Makefile.am
index 005e07cc2..f7725e28e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,118 +9,16 @@
# PARTICULAR PURPOSE.
-AUTOMAKE_OPTIONS = gnu ansi2knr
+AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = tests
+SUBDIRS = doc src tests tune
-nobase_dist_doc_DATA = AUTHORS BUGS COPYING COPYING.LESSER FAQ.html NEWS TODO \
+nobase_dist_doc_DATA = AUTHORS BUGS COPYING COPYING.LESSER NEWS TODO \
examples/ReadMe examples/divworst.c examples/rndo-add.c examples/sample.c \
- examples/version.c
+ examples/version.c tools/get_patches.sh
-EXTRA_DIST = PATCHES VERSION get_patches.sh round_raw_generic.c jyn_asympt.c
-
-include_HEADERS = mpfr.h mpf2mpfr.h
-
-BUILT_SOURCES = mparam.h
-
-lib_LTLIBRARIES = libmpfr.la
-
-libmpfr_la_SOURCES = mpfr.h mpf2mpfr.h mpfr-gmp.h mpfr-impl.h \
-mpfr-longlong.h mpfr-thread.h exceptions.c extract.c uceil_exp2.c \
-uceil_log2.c ufloor_log2.c add.c add1.c add_ui.c agm.c clear.c cmp.c \
-cmp_abs.c cmp_si.c cmp_ui.c comparisons.c div_2exp.c div_2si.c \
-div_2ui.c div.c div_ui.c dump.c eq.c exp10.c exp2.c exp3.c exp.c \
-frac.c get_d.c get_exp.c get_str.c init.c inp_str.c isinteger.c \
-isinf.c isnan.c isnum.c const_log2.c log.c modf.c mul_2exp.c mul_2si.c \
-mul_2ui.c mul.c mul_ui.c neg.c next.c out_str.c printf.c vasprintf.c \
-const_pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c \
-reldiff.c round_prec.c set.c setmax.c setmin.c set_d.c set_dfl_prec.c \
-set_exp.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c \
-set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c \
-sub_ui.c rint.c ui_div.c ui_sub.c urandom.c urandomb.c get_z_exp.c \
-swap.c factorial.c cosh.c sinh.c tanh.c sinh_cosh.c acosh.c asinh.c \
-atanh.c atan.c cmp2.c exp_2.c asin.c const_euler.c cos.c sin.c tan.c \
-fma.c fms.c hypot.c log1p.c expm1.c log2.c log10.c ui_pow.c \
-ui_pow_ui.c minmax.c dim.c signbit.c copysign.c setsign.c gmp_op.c \
-init2.c acos.c sin_cos.c set_nan.c set_inf.c set_zero.c powerof2.c \
-gamma.c set_ld.c get_ld.c cbrt.c volatile.c fits_s.h fits_sshort.c \
-fits_sint.c fits_slong.c fits_u.h fits_ushort.c fits_uint.c \
-fits_ulong.c fits_uintmax.c fits_intmax.c get_si.c get_ui.c zeta.c \
-cmp_d.c erf.c inits.c inits2.c clears.c sgn.c check.c sub1sp.c \
-version.c mpn_exp.c mpfr-gmp.c mp_clz_tab.c sum.c add1sp.c \
-free_cache.c si_op.c cmp_ld.c set_ui_2exp.c set_si_2exp.c set_uj.c \
-set_sj.c get_sj.c get_uj.c get_z.c iszero.c cache.c sqr.c \
-int_ceil_log2.c isqrt.c strtofr.c pow_z.c logging.c mulders.c get_f.c \
-round_p.c erfc.c atan2.c subnormal.c const_catalan.c root.c \
-gen_inverse.h sec.c csc.c cot.c eint.c sech.c csch.c coth.c \
-round_near_x.c constant.c abort_prec_max.c stack_interface.c lngamma.c \
-zeta_ui.c set_d64.c get_d64.c jn.c yn.c rem1.c get_patches.c add_d.c \
-sub_d.c d_sub.c mul_d.c div_d.c d_div.c li2.c rec_sqrt.c min_prec.c \
-buildopt.c digamma.c bernoulli.c isregular.c set_flt.c get_flt.c \
-scale2.c set_z_exp.c ai.c gammaonethird.c ieee_floats.h
-
-libmpfr_la_LIBADD = @LIBOBJS@
-
-# Libtool -version-info CURRENT[:REVISION[:AGE]] for libmpfr.la
-#
-# 1. No interfaces changed, only implementations (good):
-# ==> Increment REVISION.
-# 2. Interfaces added, none removed (good):
-# ==> Increment CURRENT, increment AGE, set REVISION to 0.
-# 3. Interfaces removed or changed (BAD, breaks upward compatibility):
-# ==> Increment CURRENT, set AGE and REVISION to 0.
-#
-# MPFR -version-info
-# 2.1.x -
-# 2.2.x 1:x:0
-# 2.3.x 2:x:1
-# 2.4.x 3:x:2
-# 3.0.x 4:x:0
-# 3.1.x 4:x:1
-libmpfr_la_LDFLAGS = -version-info 4:0:1
-
-info_TEXINFOS = mpfr.texi
-
-mpfr_TEXINFOS = fdl.texi
-
-MAKEINFOFLAGS = --enable-encoding
-
-# Important note: If for some reason, srcdir is read-only at build time
-# (and you use objdir != srcdir), then you need to rebuild get_patches.c
-# (with "make get_patches.c") just after patching the MPFR source. This
-# should not be a problem in practice, in particular because "make dist"
-# automatically rebuilds get_patches.c before generating the archives.
-$(srcdir)/get_patches.c: PATCHES get_patches.sh
- (cd $(srcdir) && ./get_patches.sh) > $@ || rm -f $@
-
-# Do not add get_patches.c to CLEANFILES so that this file doesn't
-# need to be (re)built as long as no patches are applied. Anyway the
-# update of this file should be regarded as part of the patch process,
-# and "make clean" shouldn't remove it, just like it doesn't remove
-# what has been changed by "patch".
-#CLEANFILES = get_patches.c
-
-# Tune program
-EXTRA_PROGRAMS = tuneup speed bidimensional_sample
-
-bidimensional_sample_SOURCES = bidimensional_sample.c
-bidimensional_sample_LDADD = -lspeed libmpfr.la
-bidimensional_sample_LDFLAGS = -static
-
-tuneup_SOURCES = tuneup.c
-tuneup_LDADD = -lspeed libmpfr.la
-tuneup_LDFLAGS = -static
-
-speed_SOURCES = speed.c
-speed_LDADD = -lspeed libmpfr.la
-speed_LDFLAGS = -static
-
-tune:
- $(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
- ./tuneup -v
- $(MAKE) $(AM_MAKEFLAGS) clean
- $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
+EXTRA_DIST = PATCHES VERSION
# In a "make dist", check that libtool -version-info value is up-to-date.
# But if the VERSION file contains "-dev", this is not checked.
@@ -130,9 +28,9 @@ dist-hook:
mv=`sed -n "s/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\\\\\\.\2/p" $(srcdir)/VERSION` && \
pl=`sed -n "s/^$$mv\.\([0-9][0-9]*\).*/\1/p" $(srcdir)/VERSION` && \
printf "mv=%s / pl=%s\n" "$$mv" "$$pl" && \
- vinfo=`sed -n "s/^# *$$mv\.x *\([0-9][0-9]*\):x:\([0-9][0-9]*\)/\1:$$pl:\2/p" $(srcdir)/Makefile.am` && \
+ vinfo=`sed -n "s/^# *$$mv\.x *\([0-9][0-9]*\):x:\([0-9][0-9]*\)/\1:$$pl:\2/p" $(srcdir)/src/Makefile.am` && \
printf "vinfo=%s\n" "$$vinfo" && \
- grep -q -e "-version-info $$vinfo$$" $(srcdir)/Makefile.am; }
+ grep -q -e "-version-info $$vinfo$$" $(srcdir)/src/Makefile.am; }
# The following needs to be removed once GNU Automake 1.11 support is added.
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz \
diff --git a/NEWS b/NEWS
index 625fc039b..c702ba38e 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
Changes from versions 3.0.* to version 3.1.0:
- The "" release.
+- The MPFR source has been reorganized.
+- Dropped ansi2knr support.
- Bug fixes.
Changes from versions 2.4.* to version 3.0.0:
diff --git a/README b/README
index d0d4d5a2d..2735fb0b4 100644
--- a/README
+++ b/README
@@ -28,7 +28,6 @@ BUGS - bugs in MPFR - please read this file!
COPYING - the GNU General Public License, version 3
COPYING.LESSER - the GNU Lesser General Public License, version 3
ChangeLog - the log of changes
-FAQ.html - frequently asked questions about MPFR
INSTALL - how to install MPFR (see also mpfr.texi)
Makefile* - files for building the library
NEWS - new features with respect to previous versions
@@ -37,25 +36,20 @@ README - this file
TODO - what remains to do (any help is welcome!)
VERSION - version of MPFR (next release version if taken by Subversion)
ac*.m4 - automatic configuration files
-ansi2knr.* - convert ANSI C to Kernighan & Ritchie C (source and man page)
-*.c - source files
-*.h - header files
compile - auxiliary installation file
config.* - auxiliary installation files
configure* - configuration files
depcomp - auxiliary installation file
+doc/ - directory containing the documentation (manual, FAQ)
examples/ - directory containing examples
-fdl.texi - the GNU Free Documentation License
-get_patches.sh - rebuild get_patches.c when patches have been applied
install-sh - installation file
ltmain.sh - auxiliary installation file
m4/ - directory containing additional configuration files
missing - auxiliary installation file
-mparam_h.in - header file template
-mpfr.info - info file for MPFR
-mpfr.texi - texinfo documentation for MPFR (source)
-tests/ - test directory
-texinfo.tex - TeX macros to handle mpfr.texi
+src/ - directory containing the MPFR source
+tests/ - directory containing the testsuite (for "make check")
+tools/ - directory containing various tools
+tune/ - directory containing files for tuning MPFR
According to the special exception to the GNU General Public License,
the autotools files compile, config.sub, config.guess, ltmain.sh,
diff --git a/TODO b/TODO
index 56f404818..2acc1a340 100644
--- a/TODO
+++ b/TODO
@@ -433,5 +433,3 @@ Table of contents:
couple of places already. Arrays of chars are not much fun.
- use http://gcc.gnu.org/viewcvs/trunk/config/stdint.m4 for mpfr-gmp.h
-
-- rename configure.in to configure.ac
diff --git a/acinclude.m4 b/acinclude.m4
index 5e411444b..e6d99ce76 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -371,8 +371,7 @@ dnl important to run the test below.
if test "$enable_thread_safe" = yes; then
AC_CACHE_CHECK([for TLS support], mpfr_cv_working_tls, [
saved_CPPFLAGS="$CPPFLAGS"
-# The -I$srcdir is necessary when objdir is different from srcdir.
-CPPFLAGS="$CPPFLAGS -I$srcdir"
+CPPFLAGS="$CPPFLAGS -I$srcdir/src"
AC_RUN_IFELSE([
#define MPFR_USE_THREAD_SAFE 1
#include "mpfr-thread.h"
diff --git a/configure.in b/configure.ac
index d1a0c57ad..a996d1f27 100644
--- a/configure.in
+++ b/configure.ac
@@ -496,7 +496,7 @@ if test -f confdefs.h; then
fi
dnl Output
-AC_CONFIG_FILES([Makefile tests/Makefile mparam.h:mparam_h.in])
+AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile tests/Makefile tune/Makefile src/mparam.h:src/mparam_h.in])
AC_OUTPUT
dnl NEWS README AUTHORS Changelog
diff --git a/FAQ.html b/doc/FAQ.html
index 66ac1af06..66ac1af06 100644
--- a/FAQ.html
+++ b/doc/FAQ.html
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 000000000..f4fa39549
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,18 @@
+# Copyright 2010 Free Software Foundation, Inc.
+# This Makefile.am is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+dist_doc_DATA = FAQ.html
+
+info_TEXINFOS = mpfr.texi
+
+mpfr_TEXINFOS = fdl.texi
+
+MAKEINFOFLAGS = --enable-encoding
diff --git a/README.dev b/doc/README.dev
index 3d4a660d1..d4539213e 100644
--- a/README.dev
+++ b/doc/README.dev
@@ -34,29 +34,29 @@ Patches can be tracked by adding a chunk of the form
+<your-id-here>
to the patch file[*]. After such patches have been applied, the file
-get_patches.c providing the mpfr_get_patches() function will be rebuilt
-by "make". MPFR distributors can still modify the version suffix from
-the applied patches according to their version naming scheme; for
-instance, for their own patches, MPFR developers do:
+src/get_patches.c providing the mpfr_get_patches() function will be
+rebuilt by "make". MPFR distributors can still modify the version
+suffix from the applied patches according to their version naming
+scheme; for instance, for their own patches, MPFR developers do:
- ./update-version 2 4 0 p1 -
+ tools/update-version 3 1 0 p1 -
[*] This idea comes from Thomas Roessler, who implemented it in Mutt.
-For patches from MPFR developers, e.g. for MPFR 2.4.0:
-1. Unarchive the tarball: a directory mpfr-2.4.0 is created.
-2. Go into this directory (cd mpfr-2.4.0).
+For patches from MPFR developers, e.g. for MPFR 3.1.0:
+1. Unarchive the tarball: a directory mpfr-3.1.0 is created.
+2. Go into this directory (cd mpfr-3.1.0).
3. Apply the current patches with "patch -N -Z -p1 < /path/to/allpatches".
4. Reset the PATCHES file with "true >| PATCHES".
-5. Rename mpfr-2.4.0 as mpfr-2.4.0-a and duplicate it as mpfr-2.4.0-b
+5. Rename mpfr-3.1.0 as mpfr-3.1.0-a and duplicate it as mpfr-3.1.0-b
without changing the timestamps (e.g. with cp -a).
-6. In mpfr-2.4.0-b, apply the patch obtained with "svn diff", e.g.
+6. In mpfr-3.1.0-b, apply the patch obtained with "svn diff", e.g.
patch --no-backup-if-mismatch -p0 < /path/to/new_patch
-7. Update the version information:
- /path/to/mpfr-working-copy/update-version 2 4 0 p<n> -
+7. In mpfr-3.1.0-b, update the version information:
+ tools/update-version 3 1 0 p<n> -
where <n> is the patch number.
-8. Update PATCHES file: echo >> PATCHES <patch_name>
-9. Make the patch: TZ=UTC diff -Naurd mpfr-2.4.0-a mpfr-2.4.0-b
+8. In mpfr-3.1.0-b, update PATCHES file: echo >> PATCHES <patch_name>
+9. Make the patch: TZ=UTC diff -Naurd mpfr-3.1.0-a mpfr-3.1.0-b
Note: if autotools files are modified, the corresponding changes in the
distributed files depending on them must be included in the patch, and
@@ -88,12 +88,12 @@ To make a release (for the MPFR team):
*** Please read this section entirely before making any release. ***
- 0) Make sure that the mpfr-longlong.h file (from GMP's longlong.h) and
- the libtool-related files (config.guess, etc.) are up-to-date. An
- "autoreconf -f -i" may be necessary.
+ 0) Make sure that the src/mpfr-longlong.h file (from GMP's longlong.h)
+ and the libtool-related files (config.guess, etc.) are up-to-date.
+ An "autoreconf -f -i" may be necessary.
- 1) Generate the tuning parameters on different architectures
- and put them in mparam_h.in. For each architecture:
+ 1) Generate the tuning parameters on different architectures and
+ put them in src/mparam_h.in. For each architecture:
a) download the latest release of GMP on gmplib.org
b) build GMP with --disable-shared in say /tmp/gmp-x.y.z
@@ -102,14 +102,14 @@ To make a release (for the MPFR team):
however you need to go into /tmp/gmp-x.y.z/tune and type "make speed"
(the MPFR tuning is using the resulting speed library)
c) configure MPFR with --disable-shared --with-gmp-build=/tmp/gmp-x.y.z
- d) run "make" and "make tune"
+ d) go into the "tune" directory and run "make tune"
e) put the resulting mparam.h file into mparam_h.in (please include
the version of GMP and the compiler used)
You can produce time graphs to check the thresholds are correct (and
compare to the corresponding mpf functions) with mbench. For example:
- $ cd mpfr/mbench
+ $ cd mpfr/tools/mbench
$ make mpfr-gfx GMP=... MPFR=...
$ ./mpfr-gfx -b16 -e320 -s16 -f2 -x3 # compares mpfr_mul and mpf_mul
# from 16 to 320 bits with increment
@@ -132,12 +132,13 @@ To make a release (for the MPFR team):
2) Check the version and change the suffix to "rc1", "rc2", etc. with
update-version for the release candidates; remove the suffix for
the final release.
- Update the libtool version too (see Makefile.am).
- Update the date in mpfr.texi.
+ Update the libtool version too (see src/Makefile.am).
+ Update the date in doc/mpfr.texi.
3) Update the NEWS file, in particular say if the the release is binary
and/or API compatible (or not) with previous releases.
- Update the FAQ.html file with update-faq (and check it).
+ Update the FAQ.html file with update-faq (and check it) in the doc
+ directory.
4) Update the ChangeLog file with "TZ=UTC svn log -rHEAD:0 -v" in
UTF-8 locales, e.g. "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v".
@@ -194,7 +195,8 @@ To make a release (for the MPFR team):
the new library version: for instance, build the shared library of
old and new MPFR versions with the same configure options, and from
the build directory of the old version, do something like:
- (cd .libs && ln -nsf ../../mpfr-new/.libs/libmpfr.so.1.* libmpfr.so.1)
+ (cd src/.libs && \
+ ln -nsf ../../../mpfr-new/src/.libs/libmpfr.so.1.* libmpfr.so.1)
then "make check".
7) For the release itself (not the release candidates), if no problems
@@ -205,13 +207,15 @@ To make a release (for the MPFR team):
next version (use the "dev" suffix).
9) Create a web page for the MPFR release and add the documentation
- (for mpfr.html, use "makeinfo --html --no-split mpfr.texi").
+ (for mpfr.html, use "makeinfo --html --no-split mpfr.texi" from
+ the doc directory).
Upload the tarballs and the signatures to the MPFR web server
- (via svn), to INRIAGForge and to the GNU FTP site. Update the
- mpfr-current symbolic link and the history page. Announce the
- release in the mpfr-announce, gmp-discuss and gcc mailing-lists,
- and on INRIAGForge. In case of a new patchlevel release, add a
- link from the web page of the previous release.
+ (via svn), to INRIAGForge and to the GNU FTP site.
+ Update the mpfr-current symbolic link and the history page.
+ Announce the release in the mpfr-announce, gmp-discuss and gcc
+ mailing-lists, and on INRIAGForge.
+ In case of a new patchlevel release, add a link from the web page
+ of the previous release.
For major or minor releases (but not patchlevels), a branch may be
created first to allow new features to be committed to the trunk.
@@ -681,9 +685,9 @@ Running "make" outputs a lot of information, and warnings are not very
visible. The following tool "eet" allows a copy of warning messages to
be output to a different window (e.g. xterm or zenity):
- http://www.vinc17.org/unix/#eet
+ http://www.vinc17.net/unix/#eet
-Direct link to the tarball: http://www.vinc17.org/unix/eet.tar.bz2
+Direct link to the tarball: http://www.vinc17.net/unix/eet.tar.bz2
===========================================================================
diff --git a/algorithm2e.sty b/doc/algorithm2e.sty
index ec12a2520..ec12a2520 100644
--- a/algorithm2e.sty
+++ b/doc/algorithm2e.sty
diff --git a/algorithms.bib b/doc/algorithms.bib
index 0ac6bfcab..0ac6bfcab 100644
--- a/algorithms.bib
+++ b/doc/algorithms.bib
diff --git a/algorithms.tex b/doc/algorithms.tex
index 55d7249b2..55d7249b2 100644
--- a/algorithms.tex
+++ b/doc/algorithms.tex
diff --git a/faq.xsl b/doc/faq.xsl
index c963b8685..c963b8685 100644
--- a/faq.xsl
+++ b/doc/faq.xsl
diff --git a/fdl.texi b/doc/fdl.texi
index 694e23e91..694e23e91 100644
--- a/fdl.texi
+++ b/doc/fdl.texi
diff --git a/mpfr.texi b/doc/mpfr.texi
index 411272e98..3083d596f 100644
--- a/mpfr.texi
+++ b/doc/mpfr.texi
@@ -3,7 +3,7 @@
@setfilename mpfr.info
@documentencoding UTF-8
@set VERSION 3.1.0-dev
-@set UPDATED-MONTH June 2010
+@set UPDATED-MONTH August 2010
@settitle GNU MPFR @value{VERSION}
@synindex tp fn
@iftex
@@ -429,8 +429,9 @@ Create a Postscript version of the manual, in @file{mpfr.ps}.
@samp{mpfr.html} or @samp{html}
Create a HTML version of the manual, in several pages in the directory
-@file{mpfr.html}; if you want only one output HTML file, then type
-@samp{makeinfo --html --no-split mpfr.texi} instead.
+@file{doc/mpfr.html}; if you want only one output HTML file, then type
+@samp{makeinfo --html --no-split mpfr.texi} from the @samp{doc} directory
+instead.
@item
@samp{clean}
diff --git a/update-faq b/doc/update-faq
index 65ab13c59..65ab13c59 100755
--- a/update-faq
+++ b/doc/update-faq
diff --git a/cputime.h b/other/cputime.h
index d32a77a8c..d32a77a8c 100644
--- a/cputime.h
+++ b/other/cputime.h
diff --git a/div-short.c b/other/div-short.c
index f0011e919..f0011e919 100644
--- a/div-short.c
+++ b/other/div-short.c
diff --git a/replace_all b/replace_all
deleted file mode 100755
index d77d853d5..000000000
--- a/replace_all
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/csh
-foreach f (*.c *.h mpfr.texi FAQ.html TODO)
- sed "s/$1/$2/g" $f > /tmp/$f
- mv /tmp/$f $f
-end
-cd tests
-foreach f (*.c *.h)
- sed "s/$1/$2/g" $f > /tmp/$f
- mv /tmp/$f $f
-end
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 000000000..d94bf5d62
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,87 @@
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This Makefile.am is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+EXTRA_DIST = round_raw_generic.c jyn_asympt.c
+
+include_HEADERS = mpfr.h mpf2mpfr.h
+
+BUILT_SOURCES = mparam.h
+
+lib_LTLIBRARIES = libmpfr.la
+
+libmpfr_la_SOURCES = mpfr.h mpf2mpfr.h mpfr-gmp.h mpfr-impl.h \
+mpfr-longlong.h mpfr-thread.h exceptions.c extract.c uceil_exp2.c \
+uceil_log2.c ufloor_log2.c add.c add1.c add_ui.c agm.c clear.c cmp.c \
+cmp_abs.c cmp_si.c cmp_ui.c comparisons.c div_2exp.c div_2si.c \
+div_2ui.c div.c div_ui.c dump.c eq.c exp10.c exp2.c exp3.c exp.c \
+frac.c get_d.c get_exp.c get_str.c init.c inp_str.c isinteger.c \
+isinf.c isnan.c isnum.c const_log2.c log.c modf.c mul_2exp.c mul_2si.c \
+mul_2ui.c mul.c mul_ui.c neg.c next.c out_str.c printf.c vasprintf.c \
+const_pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c \
+reldiff.c round_prec.c set.c setmax.c setmin.c set_d.c set_dfl_prec.c \
+set_exp.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c \
+set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c \
+sub_ui.c rint.c ui_div.c ui_sub.c urandom.c urandomb.c get_z_exp.c \
+swap.c factorial.c cosh.c sinh.c tanh.c sinh_cosh.c acosh.c asinh.c \
+atanh.c atan.c cmp2.c exp_2.c asin.c const_euler.c cos.c sin.c tan.c \
+fma.c fms.c hypot.c log1p.c expm1.c log2.c log10.c ui_pow.c \
+ui_pow_ui.c minmax.c dim.c signbit.c copysign.c setsign.c gmp_op.c \
+init2.c acos.c sin_cos.c set_nan.c set_inf.c set_zero.c powerof2.c \
+gamma.c set_ld.c get_ld.c cbrt.c volatile.c fits_s.h fits_sshort.c \
+fits_sint.c fits_slong.c fits_u.h fits_ushort.c fits_uint.c \
+fits_ulong.c fits_uintmax.c fits_intmax.c get_si.c get_ui.c zeta.c \
+cmp_d.c erf.c inits.c inits2.c clears.c sgn.c check.c sub1sp.c \
+version.c mpn_exp.c mpfr-gmp.c mp_clz_tab.c sum.c add1sp.c \
+free_cache.c si_op.c cmp_ld.c set_ui_2exp.c set_si_2exp.c set_uj.c \
+set_sj.c get_sj.c get_uj.c get_z.c iszero.c cache.c sqr.c \
+int_ceil_log2.c isqrt.c strtofr.c pow_z.c logging.c mulders.c get_f.c \
+round_p.c erfc.c atan2.c subnormal.c const_catalan.c root.c \
+gen_inverse.h sec.c csc.c cot.c eint.c sech.c csch.c coth.c \
+round_near_x.c constant.c abort_prec_max.c stack_interface.c lngamma.c \
+zeta_ui.c set_d64.c get_d64.c jn.c yn.c rem1.c get_patches.c add_d.c \
+sub_d.c d_sub.c mul_d.c div_d.c d_div.c li2.c rec_sqrt.c min_prec.c \
+buildopt.c digamma.c bernoulli.c isregular.c set_flt.c get_flt.c \
+scale2.c set_z_exp.c ai.c gammaonethird.c ieee_floats.h
+
+libmpfr_la_LIBADD = @LIBOBJS@
+
+# Libtool -version-info CURRENT[:REVISION[:AGE]] for libmpfr.la
+#
+# 1. No interfaces changed, only implementations (good):
+# ==> Increment REVISION.
+# 2. Interfaces added, none removed (good):
+# ==> Increment CURRENT, increment AGE, set REVISION to 0.
+# 3. Interfaces removed or changed (BAD, breaks upward compatibility):
+# ==> Increment CURRENT, set AGE and REVISION to 0.
+#
+# MPFR -version-info
+# 2.1.x -
+# 2.2.x 1:x:0
+# 2.3.x 2:x:1
+# 2.4.x 3:x:2
+# 3.0.x 4:x:0
+# 3.1.x 4:x:1
+libmpfr_la_LDFLAGS = -version-info 4:0:1
+
+# Important note: If for some reason, srcdir is read-only at build time
+# (and you use objdir != srcdir), then you need to rebuild get_patches.c
+# (with "make get_patches.c") just after patching the MPFR source. This
+# should not be a problem in practice, in particular because "make dist"
+# automatically rebuilds get_patches.c before generating the archives.
+$(srcdir)/get_patches.c: $(top_srcdir)/PATCHES $(top_srcdir)/tools/get_patches.sh
+ (cd $(top_srcdir) && ./tools/get_patches.sh) > $@ || rm -f $@
+
+# Do not add get_patches.c to CLEANFILES so that this file doesn't
+# need to be (re)built as long as no patches are applied. Anyway the
+# update of this file should be regarded as part of the patch process,
+# and "make clean" shouldn't remove it, just like it doesn't remove
+# what has been changed by "patch".
+#CLEANFILES = get_patches.c
diff --git a/abort_prec_max.c b/src/abort_prec_max.c
index 8cebae87e..8cebae87e 100644
--- a/abort_prec_max.c
+++ b/src/abort_prec_max.c
diff --git a/acos.c b/src/acos.c
index cf019d439..cf019d439 100644
--- a/acos.c
+++ b/src/acos.c
diff --git a/acosh.c b/src/acosh.c
index 142b0398e..142b0398e 100644
--- a/acosh.c
+++ b/src/acosh.c
diff --git a/add.c b/src/add.c
index 08b56de9a..08b56de9a 100644
--- a/add.c
+++ b/src/add.c
diff --git a/add1.c b/src/add1.c
index 009109212..009109212 100644
--- a/add1.c
+++ b/src/add1.c
diff --git a/add1sp.c b/src/add1sp.c
index 49e691c90..49e691c90 100644
--- a/add1sp.c
+++ b/src/add1sp.c
diff --git a/add_d.c b/src/add_d.c
index 041ce45c9..041ce45c9 100644
--- a/add_d.c
+++ b/src/add_d.c
diff --git a/add_ui.c b/src/add_ui.c
index e163cb6e1..e163cb6e1 100644
--- a/add_ui.c
+++ b/src/add_ui.c
diff --git a/agm.c b/src/agm.c
index 7ec4a3670..7ec4a3670 100644
--- a/agm.c
+++ b/src/agm.c
diff --git a/ai.c b/src/ai.c
index b9c48d41d..b9c48d41d 100644
--- a/ai.c
+++ b/src/ai.c
diff --git a/asin.c b/src/asin.c
index 3ef78f06d..3ef78f06d 100644
--- a/asin.c
+++ b/src/asin.c
diff --git a/asinh.c b/src/asinh.c
index 164c3282c..164c3282c 100644
--- a/asinh.c
+++ b/src/asinh.c
diff --git a/atan.c b/src/atan.c
index 53b34e030..53b34e030 100644
--- a/atan.c
+++ b/src/atan.c
diff --git a/atan2.c b/src/atan2.c
index 786c4a017..786c4a017 100644
--- a/atan2.c
+++ b/src/atan2.c
diff --git a/atanh.c b/src/atanh.c
index a8d1ee9a4..a8d1ee9a4 100644
--- a/atanh.c
+++ b/src/atanh.c
diff --git a/bernoulli.c b/src/bernoulli.c
index ed5c1a5b2..ed5c1a5b2 100644
--- a/bernoulli.c
+++ b/src/bernoulli.c
diff --git a/buildopt.c b/src/buildopt.c
index 267b30e5b..267b30e5b 100644
--- a/buildopt.c
+++ b/src/buildopt.c
diff --git a/cache.c b/src/cache.c
index 10a276bbe..10a276bbe 100644
--- a/cache.c
+++ b/src/cache.c
diff --git a/cbrt.c b/src/cbrt.c
index 4ecf28a46..4ecf28a46 100644
--- a/cbrt.c
+++ b/src/cbrt.c
diff --git a/check.c b/src/check.c
index e0137cebe..e0137cebe 100644
--- a/check.c
+++ b/src/check.c
diff --git a/clear.c b/src/clear.c
index 267fd2329..267fd2329 100644
--- a/clear.c
+++ b/src/clear.c
diff --git a/clears.c b/src/clears.c
index c3a061029..c3a061029 100644
--- a/clears.c
+++ b/src/clears.c
diff --git a/cmp.c b/src/cmp.c
index 667a12439..667a12439 100644
--- a/cmp.c
+++ b/src/cmp.c
diff --git a/cmp2.c b/src/cmp2.c
index 14d28a389..14d28a389 100644
--- a/cmp2.c
+++ b/src/cmp2.c
diff --git a/cmp_abs.c b/src/cmp_abs.c
index 3f126d49e..3f126d49e 100644
--- a/cmp_abs.c
+++ b/src/cmp_abs.c
diff --git a/cmp_d.c b/src/cmp_d.c
index 4026f38bd..4026f38bd 100644
--- a/cmp_d.c
+++ b/src/cmp_d.c
diff --git a/cmp_ld.c b/src/cmp_ld.c
index 02770fd7d..02770fd7d 100644
--- a/cmp_ld.c
+++ b/src/cmp_ld.c
diff --git a/cmp_si.c b/src/cmp_si.c
index 4fbf3abfa..4fbf3abfa 100644
--- a/cmp_si.c
+++ b/src/cmp_si.c
diff --git a/cmp_ui.c b/src/cmp_ui.c
index c414273b3..c414273b3 100644
--- a/cmp_ui.c
+++ b/src/cmp_ui.c
diff --git a/comparisons.c b/src/comparisons.c
index 53fd88c2b..53fd88c2b 100644
--- a/comparisons.c
+++ b/src/comparisons.c
diff --git a/const_catalan.c b/src/const_catalan.c
index 7905f4653..7905f4653 100644
--- a/const_catalan.c
+++ b/src/const_catalan.c
diff --git a/const_euler.c b/src/const_euler.c
index e5128682d..e5128682d 100644
--- a/const_euler.c
+++ b/src/const_euler.c
diff --git a/const_log2.c b/src/const_log2.c
index e97172b43..e97172b43 100644
--- a/const_log2.c
+++ b/src/const_log2.c
diff --git a/const_pi.c b/src/const_pi.c
index 1452a2399..1452a2399 100644
--- a/const_pi.c
+++ b/src/const_pi.c
diff --git a/constant.c b/src/constant.c
index c559a864f..c559a864f 100644
--- a/constant.c
+++ b/src/constant.c
diff --git a/copysign.c b/src/copysign.c
index 05cfe088e..05cfe088e 100644
--- a/copysign.c
+++ b/src/copysign.c
diff --git a/cos.c b/src/cos.c
index d7d0bc196..d7d0bc196 100644
--- a/cos.c
+++ b/src/cos.c
diff --git a/cosh.c b/src/cosh.c
index 69ae3b5f6..69ae3b5f6 100644
--- a/cosh.c
+++ b/src/cosh.c
diff --git a/cot.c b/src/cot.c
index 3dce042bf..3dce042bf 100644
--- a/cot.c
+++ b/src/cot.c
diff --git a/coth.c b/src/coth.c
index edab6f19c..edab6f19c 100644
--- a/coth.c
+++ b/src/coth.c
diff --git a/csc.c b/src/csc.c
index e89a319bf..e89a319bf 100644
--- a/csc.c
+++ b/src/csc.c
diff --git a/csch.c b/src/csch.c
index d15bdd3e4..d15bdd3e4 100644
--- a/csch.c
+++ b/src/csch.c
diff --git a/d_div.c b/src/d_div.c
index a67b28209..a67b28209 100644
--- a/d_div.c
+++ b/src/d_div.c
diff --git a/d_sub.c b/src/d_sub.c
index ef3a418c6..ef3a418c6 100644
--- a/d_sub.c
+++ b/src/d_sub.c
diff --git a/digamma.c b/src/digamma.c
index b6d48a4a8..b6d48a4a8 100644
--- a/digamma.c
+++ b/src/digamma.c
diff --git a/dim.c b/src/dim.c
index 078a69e03..078a69e03 100644
--- a/dim.c
+++ b/src/dim.c
diff --git a/div.c b/src/div.c
index 534511e26..534511e26 100644
--- a/div.c
+++ b/src/div.c
diff --git a/div_2exp.c b/src/div_2exp.c
index 4d321ee45..4d321ee45 100644
--- a/div_2exp.c
+++ b/src/div_2exp.c
diff --git a/div_2si.c b/src/div_2si.c
index 2837924a2..2837924a2 100644
--- a/div_2si.c
+++ b/src/div_2si.c
diff --git a/div_2ui.c b/src/div_2ui.c
index 8526b69a9..8526b69a9 100644
--- a/div_2ui.c
+++ b/src/div_2ui.c
diff --git a/div_d.c b/src/div_d.c
index f8af1a17f..f8af1a17f 100644
--- a/div_d.c
+++ b/src/div_d.c
diff --git a/div_ui.c b/src/div_ui.c
index b7e9a3b7f..b7e9a3b7f 100644
--- a/div_ui.c
+++ b/src/div_ui.c
diff --git a/dump.c b/src/dump.c
index b6d3983a9..b6d3983a9 100644
--- a/dump.c
+++ b/src/dump.c
diff --git a/eint.c b/src/eint.c
index b5897ba14..b5897ba14 100644
--- a/eint.c
+++ b/src/eint.c
diff --git a/eq.c b/src/eq.c
index 598b1c25d..598b1c25d 100644
--- a/eq.c
+++ b/src/eq.c
diff --git a/erf.c b/src/erf.c
index 2ed4c299e..2ed4c299e 100644
--- a/erf.c
+++ b/src/erf.c
diff --git a/erfc.c b/src/erfc.c
index bca363360..bca363360 100644
--- a/erfc.c
+++ b/src/erfc.c
diff --git a/exceptions.c b/src/exceptions.c
index 34e26b31f..34e26b31f 100644
--- a/exceptions.c
+++ b/src/exceptions.c
diff --git a/exp.c b/src/exp.c
index 893e9a6b5..893e9a6b5 100644
--- a/exp.c
+++ b/src/exp.c
diff --git a/exp10.c b/src/exp10.c
index a69486a5c..a69486a5c 100644
--- a/exp10.c
+++ b/src/exp10.c
diff --git a/exp2.c b/src/exp2.c
index bf0902c86..bf0902c86 100644
--- a/exp2.c
+++ b/src/exp2.c
diff --git a/exp3.c b/src/exp3.c
index a3998614c..a3998614c 100644
--- a/exp3.c
+++ b/src/exp3.c
diff --git a/exp_2.c b/src/exp_2.c
index f0b5777b2..f0b5777b2 100644
--- a/exp_2.c
+++ b/src/exp_2.c
diff --git a/expm1.c b/src/expm1.c
index fd6d3c938..fd6d3c938 100644
--- a/expm1.c
+++ b/src/expm1.c
diff --git a/extract.c b/src/extract.c
index a1dd3a046..a1dd3a046 100644
--- a/extract.c
+++ b/src/extract.c
diff --git a/factorial.c b/src/factorial.c
index 5e40809fe..5e40809fe 100644
--- a/factorial.c
+++ b/src/factorial.c
diff --git a/fits_intmax.c b/src/fits_intmax.c
index fc6c5ef56..fc6c5ef56 100644
--- a/fits_intmax.c
+++ b/src/fits_intmax.c
diff --git a/fits_s.h b/src/fits_s.h
index 5201f2b6b..5201f2b6b 100644
--- a/fits_s.h
+++ b/src/fits_s.h
diff --git a/fits_sint.c b/src/fits_sint.c
index c9bbf3653..c9bbf3653 100644
--- a/fits_sint.c
+++ b/src/fits_sint.c
diff --git a/fits_slong.c b/src/fits_slong.c
index 2e09fa444..2e09fa444 100644
--- a/fits_slong.c
+++ b/src/fits_slong.c
diff --git a/fits_sshort.c b/src/fits_sshort.c
index 582b584fe..582b584fe 100644
--- a/fits_sshort.c
+++ b/src/fits_sshort.c
diff --git a/fits_u.h b/src/fits_u.h
index 0a84fd85d..0a84fd85d 100644
--- a/fits_u.h
+++ b/src/fits_u.h
diff --git a/fits_uint.c b/src/fits_uint.c
index bfdfe16e8..bfdfe16e8 100644
--- a/fits_uint.c
+++ b/src/fits_uint.c
diff --git a/fits_uintmax.c b/src/fits_uintmax.c
index 54ce6d3c9..54ce6d3c9 100644
--- a/fits_uintmax.c
+++ b/src/fits_uintmax.c
diff --git a/fits_ulong.c b/src/fits_ulong.c
index 607dc4051..607dc4051 100644
--- a/fits_ulong.c
+++ b/src/fits_ulong.c
diff --git a/fits_ushort.c b/src/fits_ushort.c
index 9f82e1a03..9f82e1a03 100644
--- a/fits_ushort.c
+++ b/src/fits_ushort.c
diff --git a/fma.c b/src/fma.c
index 2a413fe0a..2a413fe0a 100644
--- a/fma.c
+++ b/src/fma.c
diff --git a/fms.c b/src/fms.c
index 0e7c887d0..0e7c887d0 100644
--- a/fms.c
+++ b/src/fms.c
diff --git a/frac.c b/src/frac.c
index c13e7a155..c13e7a155 100644
--- a/frac.c
+++ b/src/frac.c
diff --git a/free_cache.c b/src/free_cache.c
index 0f66f1286..0f66f1286 100644
--- a/free_cache.c
+++ b/src/free_cache.c
diff --git a/gamma.c b/src/gamma.c
index f7c1f0aee..f7c1f0aee 100644
--- a/gamma.c
+++ b/src/gamma.c
diff --git a/gammaonethird.c b/src/gammaonethird.c
index 4dd82210a..4dd82210a 100644
--- a/gammaonethird.c
+++ b/src/gammaonethird.c
diff --git a/gen_inverse.h b/src/gen_inverse.h
index dc569793d..dc569793d 100644
--- a/gen_inverse.h
+++ b/src/gen_inverse.h
diff --git a/get_d.c b/src/get_d.c
index 7db963837..7db963837 100644
--- a/get_d.c
+++ b/src/get_d.c
diff --git a/get_d64.c b/src/get_d64.c
index 22307d042..22307d042 100644
--- a/get_d64.c
+++ b/src/get_d64.c
diff --git a/get_exp.c b/src/get_exp.c
index 9e384a293..9e384a293 100644
--- a/get_exp.c
+++ b/src/get_exp.c
diff --git a/get_f.c b/src/get_f.c
index 5725407a3..5725407a3 100644
--- a/get_f.c
+++ b/src/get_f.c
diff --git a/get_flt.c b/src/get_flt.c
index ce7d717d2..ce7d717d2 100644
--- a/get_flt.c
+++ b/src/get_flt.c
diff --git a/get_ld.c b/src/get_ld.c
index b6c05d28c..b6c05d28c 100644
--- a/get_ld.c
+++ b/src/get_ld.c
diff --git a/get_si.c b/src/get_si.c
index 8f836f8e0..8f836f8e0 100644
--- a/get_si.c
+++ b/src/get_si.c
diff --git a/get_sj.c b/src/get_sj.c
index e02adff15..e02adff15 100644
--- a/get_sj.c
+++ b/src/get_sj.c
diff --git a/get_str.c b/src/get_str.c
index aa7ad18b7..aa7ad18b7 100644
--- a/get_str.c
+++ b/src/get_str.c
diff --git a/get_ui.c b/src/get_ui.c
index 9a477ad6d..9a477ad6d 100644
--- a/get_ui.c
+++ b/src/get_ui.c
diff --git a/get_uj.c b/src/get_uj.c
index 064f18c21..064f18c21 100644
--- a/get_uj.c
+++ b/src/get_uj.c
diff --git a/get_z.c b/src/get_z.c
index 6795955e2..6795955e2 100644
--- a/get_z.c
+++ b/src/get_z.c
diff --git a/get_z_exp.c b/src/get_z_exp.c
index 851907f0b..851907f0b 100644
--- a/get_z_exp.c
+++ b/src/get_z_exp.c
diff --git a/gmp_op.c b/src/gmp_op.c
index a738c2427..a738c2427 100644
--- a/gmp_op.c
+++ b/src/gmp_op.c
diff --git a/hypot.c b/src/hypot.c
index 4b450610a..4b450610a 100644
--- a/hypot.c
+++ b/src/hypot.c
diff --git a/ieee_floats.h b/src/ieee_floats.h
index e544281e7..e544281e7 100644
--- a/ieee_floats.h
+++ b/src/ieee_floats.h
diff --git a/init.c b/src/init.c
index 63caa5007..63caa5007 100644
--- a/init.c
+++ b/src/init.c
diff --git a/init2.c b/src/init2.c
index c2b5ce3a8..c2b5ce3a8 100644
--- a/init2.c
+++ b/src/init2.c
diff --git a/inits.c b/src/inits.c
index 4193db7ec..4193db7ec 100644
--- a/inits.c
+++ b/src/inits.c
diff --git a/inits2.c b/src/inits2.c
index a17165509..a17165509 100644
--- a/inits2.c
+++ b/src/inits2.c
diff --git a/inp_str.c b/src/inp_str.c
index 7925a3643..7925a3643 100644
--- a/inp_str.c
+++ b/src/inp_str.c
diff --git a/int_ceil_log2.c b/src/int_ceil_log2.c
index de6052e36..de6052e36 100644
--- a/int_ceil_log2.c
+++ b/src/int_ceil_log2.c
diff --git a/isinf.c b/src/isinf.c
index 1027e0d1f..1027e0d1f 100644
--- a/isinf.c
+++ b/src/isinf.c
diff --git a/isinteger.c b/src/isinteger.c
index 40bc7833f..40bc7833f 100644
--- a/isinteger.c
+++ b/src/isinteger.c
diff --git a/isnan.c b/src/isnan.c
index f91e1edc1..f91e1edc1 100644
--- a/isnan.c
+++ b/src/isnan.c
diff --git a/isnum.c b/src/isnum.c
index bf3d1d5bd..bf3d1d5bd 100644
--- a/isnum.c
+++ b/src/isnum.c
diff --git a/isqrt.c b/src/isqrt.c
index 39d03171f..39d03171f 100644
--- a/isqrt.c
+++ b/src/isqrt.c
diff --git a/isregular.c b/src/isregular.c
index b85e08ada..b85e08ada 100644
--- a/isregular.c
+++ b/src/isregular.c
diff --git a/iszero.c b/src/iszero.c
index e05fa6852..e05fa6852 100644
--- a/iszero.c
+++ b/src/iszero.c
diff --git a/jn.c b/src/jn.c
index 3db992e4c..3db992e4c 100644
--- a/jn.c
+++ b/src/jn.c
diff --git a/jyn_asympt.c b/src/jyn_asympt.c
index 371300080..371300080 100644
--- a/jyn_asympt.c
+++ b/src/jyn_asympt.c
diff --git a/li2.c b/src/li2.c
index bdf776c0b..bdf776c0b 100644
--- a/li2.c
+++ b/src/li2.c
diff --git a/lngamma.c b/src/lngamma.c
index e1c0c00b7..e1c0c00b7 100644
--- a/lngamma.c
+++ b/src/lngamma.c
diff --git a/log.c b/src/log.c
index c657a6ac2..c657a6ac2 100644
--- a/log.c
+++ b/src/log.c
diff --git a/log10.c b/src/log10.c
index dfde9a6c5..dfde9a6c5 100644
--- a/log10.c
+++ b/src/log10.c
diff --git a/log1p.c b/src/log1p.c
index 39644c1ec..39644c1ec 100644
--- a/log1p.c
+++ b/src/log1p.c
diff --git a/log2.c b/src/log2.c
index cc1dc4542..cc1dc4542 100644
--- a/log2.c
+++ b/src/log2.c
diff --git a/logging.c b/src/logging.c
index 19116abdc..19116abdc 100644
--- a/logging.c
+++ b/src/logging.c
diff --git a/min_prec.c b/src/min_prec.c
index 542731992..542731992 100644
--- a/min_prec.c
+++ b/src/min_prec.c
diff --git a/minmax.c b/src/minmax.c
index 8d23f5946..8d23f5946 100644
--- a/minmax.c
+++ b/src/minmax.c
diff --git a/modf.c b/src/modf.c
index 4e9a0b4ad..4e9a0b4ad 100644
--- a/modf.c
+++ b/src/modf.c
diff --git a/mp_clz_tab.c b/src/mp_clz_tab.c
index 92db98cd6..92db98cd6 100644
--- a/mp_clz_tab.c
+++ b/src/mp_clz_tab.c
diff --git a/mparam_h.in b/src/mparam_h.in
index cb1a8169a..cb1a8169a 100644
--- a/mparam_h.in
+++ b/src/mparam_h.in
diff --git a/mpf2mpfr.h b/src/mpf2mpfr.h
index f7f6971d6..f7f6971d6 100644
--- a/mpf2mpfr.h
+++ b/src/mpf2mpfr.h
diff --git a/mpfr-gmp.c b/src/mpfr-gmp.c
index e8a3f2fbe..e8a3f2fbe 100644
--- a/mpfr-gmp.c
+++ b/src/mpfr-gmp.c
diff --git a/mpfr-gmp.h b/src/mpfr-gmp.h
index 6faed59cf..6faed59cf 100644
--- a/mpfr-gmp.h
+++ b/src/mpfr-gmp.h
diff --git a/mpfr-impl.h b/src/mpfr-impl.h
index 4663cbed0..4663cbed0 100644
--- a/mpfr-impl.h
+++ b/src/mpfr-impl.h
diff --git a/mpfr-longlong.h b/src/mpfr-longlong.h
index 9d33d5e4c..9d33d5e4c 100644
--- a/mpfr-longlong.h
+++ b/src/mpfr-longlong.h
diff --git a/mpfr-thread.h b/src/mpfr-thread.h
index 1e39a44ee..1e39a44ee 100644
--- a/mpfr-thread.h
+++ b/src/mpfr-thread.h
diff --git a/mpfr.h b/src/mpfr.h
index 0bcff0dc4..0bcff0dc4 100644
--- a/mpfr.h
+++ b/src/mpfr.h
diff --git a/mpn_exp.c b/src/mpn_exp.c
index ea2921feb..ea2921feb 100644
--- a/mpn_exp.c
+++ b/src/mpn_exp.c
diff --git a/mul.c b/src/mul.c
index a02ad788f..a02ad788f 100644
--- a/mul.c
+++ b/src/mul.c
diff --git a/mul_2exp.c b/src/mul_2exp.c
index db6ff760e..db6ff760e 100644
--- a/mul_2exp.c
+++ b/src/mul_2exp.c
diff --git a/mul_2si.c b/src/mul_2si.c
index 392348d0e..392348d0e 100644
--- a/mul_2si.c
+++ b/src/mul_2si.c
diff --git a/mul_2ui.c b/src/mul_2ui.c
index dcc5d8a44..dcc5d8a44 100644
--- a/mul_2ui.c
+++ b/src/mul_2ui.c
diff --git a/mul_d.c b/src/mul_d.c
index b989b9eaa..b989b9eaa 100644
--- a/mul_d.c
+++ b/src/mul_d.c
diff --git a/mul_ui.c b/src/mul_ui.c
index 19cf42f90..19cf42f90 100644
--- a/mul_ui.c
+++ b/src/mul_ui.c
diff --git a/mulders.c b/src/mulders.c
index 5faacb3be..5faacb3be 100644
--- a/mulders.c
+++ b/src/mulders.c
diff --git a/neg.c b/src/neg.c
index f45922de1..f45922de1 100644
--- a/neg.c
+++ b/src/neg.c
diff --git a/next.c b/src/next.c
index 79099b750..79099b750 100644
--- a/next.c
+++ b/src/next.c
diff --git a/out_str.c b/src/out_str.c
index cf1941a55..cf1941a55 100644
--- a/out_str.c
+++ b/src/out_str.c
diff --git a/pow.c b/src/pow.c
index ac806ac63..ac806ac63 100644
--- a/pow.c
+++ b/src/pow.c
diff --git a/pow_si.c b/src/pow_si.c
index 32c405acb..32c405acb 100644
--- a/pow_si.c
+++ b/src/pow_si.c
diff --git a/pow_ui.c b/src/pow_ui.c
index c7c1a35ab..c7c1a35ab 100644
--- a/pow_ui.c
+++ b/src/pow_ui.c
diff --git a/pow_z.c b/src/pow_z.c
index 061d6407c..061d6407c 100644
--- a/pow_z.c
+++ b/src/pow_z.c
diff --git a/powerof2.c b/src/powerof2.c
index 4283ee455..4283ee455 100644
--- a/powerof2.c
+++ b/src/powerof2.c
diff --git a/print_raw.c b/src/print_raw.c
index a8a1d36e1..a8a1d36e1 100644
--- a/print_raw.c
+++ b/src/print_raw.c
diff --git a/print_rnd_mode.c b/src/print_rnd_mode.c
index 60827d374..60827d374 100644
--- a/print_rnd_mode.c
+++ b/src/print_rnd_mode.c
diff --git a/printf.c b/src/printf.c
index b55c29f6f..b55c29f6f 100644
--- a/printf.c
+++ b/src/printf.c
diff --git a/rec_sqrt.c b/src/rec_sqrt.c
index 0b5df8b0e..0b5df8b0e 100644
--- a/rec_sqrt.c
+++ b/src/rec_sqrt.c
diff --git a/reldiff.c b/src/reldiff.c
index 979049135..979049135 100644
--- a/reldiff.c
+++ b/src/reldiff.c
diff --git a/rem1.c b/src/rem1.c
index 381a53e64..381a53e64 100644
--- a/rem1.c
+++ b/src/rem1.c
diff --git a/rint.c b/src/rint.c
index 6e8047f17..6e8047f17 100644
--- a/rint.c
+++ b/src/rint.c
diff --git a/root.c b/src/root.c
index 40fce3750..40fce3750 100644
--- a/root.c
+++ b/src/root.c
diff --git a/round_near_x.c b/src/round_near_x.c
index fc564adf2..fc564adf2 100644
--- a/round_near_x.c
+++ b/src/round_near_x.c
diff --git a/round_p.c b/src/round_p.c
index d1bfb42bb..d1bfb42bb 100644
--- a/round_p.c
+++ b/src/round_p.c
diff --git a/round_prec.c b/src/round_prec.c
index d5ac5c93c..d5ac5c93c 100644
--- a/round_prec.c
+++ b/src/round_prec.c
diff --git a/round_raw_generic.c b/src/round_raw_generic.c
index aadd8b461..aadd8b461 100644
--- a/round_raw_generic.c
+++ b/src/round_raw_generic.c
diff --git a/scale2.c b/src/scale2.c
index 47f30db8a..47f30db8a 100644
--- a/scale2.c
+++ b/src/scale2.c
diff --git a/sec.c b/src/sec.c
index d2f9c56b5..d2f9c56b5 100644
--- a/sec.c
+++ b/src/sec.c
diff --git a/sech.c b/src/sech.c
index 995b5ee7c..995b5ee7c 100644
--- a/sech.c
+++ b/src/sech.c
diff --git a/set.c b/src/set.c
index 7245e6b22..7245e6b22 100644
--- a/set.c
+++ b/src/set.c
diff --git a/set_d.c b/src/set_d.c
index c7037b35c..c7037b35c 100644
--- a/set_d.c
+++ b/src/set_d.c
diff --git a/set_d64.c b/src/set_d64.c
index 1b510e40f..1b510e40f 100644
--- a/set_d64.c
+++ b/src/set_d64.c
diff --git a/set_dfl_prec.c b/src/set_dfl_prec.c
index eeb4ccd19..eeb4ccd19 100644
--- a/set_dfl_prec.c
+++ b/src/set_dfl_prec.c
diff --git a/set_exp.c b/src/set_exp.c
index b79bf4faa..b79bf4faa 100644
--- a/set_exp.c
+++ b/src/set_exp.c
diff --git a/set_f.c b/src/set_f.c
index bbd6e5efd..bbd6e5efd 100644
--- a/set_f.c
+++ b/src/set_f.c
diff --git a/set_flt.c b/src/set_flt.c
index 79c106e69..79c106e69 100644
--- a/set_flt.c
+++ b/src/set_flt.c
diff --git a/set_inf.c b/src/set_inf.c
index be91f62f0..be91f62f0 100644
--- a/set_inf.c
+++ b/src/set_inf.c
diff --git a/set_ld.c b/src/set_ld.c
index 162ac96c9..162ac96c9 100644
--- a/set_ld.c
+++ b/src/set_ld.c
diff --git a/set_nan.c b/src/set_nan.c
index 2782365ec..2782365ec 100644
--- a/set_nan.c
+++ b/src/set_nan.c
diff --git a/set_prc_raw.c b/src/set_prc_raw.c
index 339882988..339882988 100644
--- a/set_prc_raw.c
+++ b/src/set_prc_raw.c
diff --git a/set_prec.c b/src/set_prec.c
index 8dde77d94..8dde77d94 100644
--- a/set_prec.c
+++ b/src/set_prec.c
diff --git a/set_q.c b/src/set_q.c
index 213b2aa3d..213b2aa3d 100644
--- a/set_q.c
+++ b/src/set_q.c
diff --git a/set_rnd.c b/src/set_rnd.c
index 447f2fee1..447f2fee1 100644
--- a/set_rnd.c
+++ b/src/set_rnd.c
diff --git a/set_si.c b/src/set_si.c
index 86008e94d..86008e94d 100644
--- a/set_si.c
+++ b/src/set_si.c
diff --git a/set_si_2exp.c b/src/set_si_2exp.c
index fcf5acf65..fcf5acf65 100644
--- a/set_si_2exp.c
+++ b/src/set_si_2exp.c
diff --git a/set_sj.c b/src/set_sj.c
index 2620f2321..2620f2321 100644
--- a/set_sj.c
+++ b/src/set_sj.c
diff --git a/set_str.c b/src/set_str.c
index 85cdfa202..85cdfa202 100644
--- a/set_str.c
+++ b/src/set_str.c
diff --git a/set_str_raw.c b/src/set_str_raw.c
index a457eb2e9..a457eb2e9 100644
--- a/set_str_raw.c
+++ b/src/set_str_raw.c
diff --git a/set_ui.c b/src/set_ui.c
index b897a4b8a..b897a4b8a 100644
--- a/set_ui.c
+++ b/src/set_ui.c
diff --git a/set_ui_2exp.c b/src/set_ui_2exp.c
index 71ad4085b..71ad4085b 100644
--- a/set_ui_2exp.c
+++ b/src/set_ui_2exp.c
diff --git a/set_uj.c b/src/set_uj.c
index 00307984e..00307984e 100644
--- a/set_uj.c
+++ b/src/set_uj.c
diff --git a/set_z.c b/src/set_z.c
index 83c789c37..83c789c37 100644
--- a/set_z.c
+++ b/src/set_z.c
diff --git a/set_z_exp.c b/src/set_z_exp.c
index 5aeea98dc..5aeea98dc 100644
--- a/set_z_exp.c
+++ b/src/set_z_exp.c
diff --git a/set_zero.c b/src/set_zero.c
index 466d2abf6..466d2abf6 100644
--- a/set_zero.c
+++ b/src/set_zero.c
diff --git a/setmax.c b/src/setmax.c
index 055b4342c..055b4342c 100644
--- a/setmax.c
+++ b/src/setmax.c
diff --git a/setmin.c b/src/setmin.c
index 0319b54cf..0319b54cf 100644
--- a/setmin.c
+++ b/src/setmin.c
diff --git a/setsign.c b/src/setsign.c
index cfc80b43e..cfc80b43e 100644
--- a/setsign.c
+++ b/src/setsign.c
diff --git a/sgn.c b/src/sgn.c
index 189d797dd..189d797dd 100644
--- a/sgn.c
+++ b/src/sgn.c
diff --git a/si_op.c b/src/si_op.c
index 5938f898d..5938f898d 100644
--- a/si_op.c
+++ b/src/si_op.c
diff --git a/signbit.c b/src/signbit.c
index 20b1e18cb..20b1e18cb 100644
--- a/signbit.c
+++ b/src/signbit.c
diff --git a/sin.c b/src/sin.c
index 010d2406f..010d2406f 100644
--- a/sin.c
+++ b/src/sin.c
diff --git a/sin_cos.c b/src/sin_cos.c
index fd3f56577..fd3f56577 100644
--- a/sin_cos.c
+++ b/src/sin_cos.c
diff --git a/sinh.c b/src/sinh.c
index d3d30ac66..d3d30ac66 100644
--- a/sinh.c
+++ b/src/sinh.c
diff --git a/sinh_cosh.c b/src/sinh_cosh.c
index af83fff68..af83fff68 100644
--- a/sinh_cosh.c
+++ b/src/sinh_cosh.c
diff --git a/sqr.c b/src/sqr.c
index 2ac7d0b2f..2ac7d0b2f 100644
--- a/sqr.c
+++ b/src/sqr.c
diff --git a/sqrt.c b/src/sqrt.c
index fa9a63ac2..fa9a63ac2 100644
--- a/sqrt.c
+++ b/src/sqrt.c
diff --git a/sqrt_ui.c b/src/sqrt_ui.c
index 270540a07..270540a07 100644
--- a/sqrt_ui.c
+++ b/src/sqrt_ui.c
diff --git a/stack_interface.c b/src/stack_interface.c
index e0a58e21f..e0a58e21f 100644
--- a/stack_interface.c
+++ b/src/stack_interface.c
diff --git a/strtofr.c b/src/strtofr.c
index 242d24adb..242d24adb 100644
--- a/strtofr.c
+++ b/src/strtofr.c
diff --git a/sub.c b/src/sub.c
index 5eb44d45a..5eb44d45a 100644
--- a/sub.c
+++ b/src/sub.c
diff --git a/sub1.c b/src/sub1.c
index f67b392fb..f67b392fb 100644
--- a/sub1.c
+++ b/src/sub1.c
diff --git a/sub1sp.c b/src/sub1sp.c
index 728101930..728101930 100644
--- a/sub1sp.c
+++ b/src/sub1sp.c
diff --git a/sub_d.c b/src/sub_d.c
index c06e45e04..c06e45e04 100644
--- a/sub_d.c
+++ b/src/sub_d.c
diff --git a/sub_ui.c b/src/sub_ui.c
index ed184a1c0..ed184a1c0 100644
--- a/sub_ui.c
+++ b/src/sub_ui.c
diff --git a/subnormal.c b/src/subnormal.c
index e7e19cbd9..e7e19cbd9 100644
--- a/subnormal.c
+++ b/src/subnormal.c
diff --git a/sum.c b/src/sum.c
index a25e75c93..a25e75c93 100644
--- a/sum.c
+++ b/src/sum.c
diff --git a/swap.c b/src/swap.c
index 4059ef288..4059ef288 100644
--- a/swap.c
+++ b/src/swap.c
diff --git a/tan.c b/src/tan.c
index 49adb3672..49adb3672 100644
--- a/tan.c
+++ b/src/tan.c
diff --git a/tanh.c b/src/tanh.c
index 23661b960..23661b960 100644
--- a/tanh.c
+++ b/src/tanh.c
diff --git a/uceil_exp2.c b/src/uceil_exp2.c
index b2ebc5d45..b2ebc5d45 100644
--- a/uceil_exp2.c
+++ b/src/uceil_exp2.c
diff --git a/uceil_log2.c b/src/uceil_log2.c
index da06dd9ff..da06dd9ff 100644
--- a/uceil_log2.c
+++ b/src/uceil_log2.c
diff --git a/ufloor_log2.c b/src/ufloor_log2.c
index 04b66e565..04b66e565 100644
--- a/ufloor_log2.c
+++ b/src/ufloor_log2.c
diff --git a/ui_div.c b/src/ui_div.c
index 42d184f41..42d184f41 100644
--- a/ui_div.c
+++ b/src/ui_div.c
diff --git a/ui_pow.c b/src/ui_pow.c
index 348394d5f..348394d5f 100644
--- a/ui_pow.c
+++ b/src/ui_pow.c
diff --git a/ui_pow_ui.c b/src/ui_pow_ui.c
index 74d4556a2..74d4556a2 100644
--- a/ui_pow_ui.c
+++ b/src/ui_pow_ui.c
diff --git a/ui_sub.c b/src/ui_sub.c
index 7b775aebb..7b775aebb 100644
--- a/ui_sub.c
+++ b/src/ui_sub.c
diff --git a/urandom.c b/src/urandom.c
index 842d31e16..842d31e16 100644
--- a/urandom.c
+++ b/src/urandom.c
diff --git a/urandomb.c b/src/urandomb.c
index e632ca83d..e632ca83d 100644
--- a/urandomb.c
+++ b/src/urandomb.c
diff --git a/vasprintf.c b/src/vasprintf.c
index d9efc9459..d9efc9459 100644
--- a/vasprintf.c
+++ b/src/vasprintf.c
diff --git a/version.c b/src/version.c
index 60e567acb..60e567acb 100644
--- a/version.c
+++ b/src/version.c
diff --git a/volatile.c b/src/volatile.c
index a48505597..a48505597 100644
--- a/volatile.c
+++ b/src/volatile.c
diff --git a/yn.c b/src/yn.c
index 5e53b8e02..5e53b8e02 100644
--- a/yn.c
+++ b/src/yn.c
diff --git a/zeta.c b/src/zeta.c
index 72c332a91..72c332a91 100644
--- a/zeta.c
+++ b/src/zeta.c
diff --git a/zeta_ui.c b/src/zeta_ui.c
index eea589380..eea589380 100644
--- a/zeta_ui.c
+++ b/src/zeta_ui.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 08c098c5c..cb12c669f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,8 +36,8 @@ check_PROGRAMS = tversion tinternals tinits tisqrt tsgn tcheck \
EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.data tmul.dat
-LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/libmpfr.la
-INCLUDES = -I$(top_srcdir) -I$(top_builddir)
+LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/src/libmpfr.la
+INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
# LOADLIBES (documented in the "GNU make" manual and equivalent to LDLIBS)
# enables to compile a program foo.c in the test directory by simply doing
@@ -47,8 +47,8 @@ LOADLIBES=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(top_builddir)/tests/.libs/
check_LTLIBRARIES = libfrtests.la
libfrtests_la_SOURCES = mpfr-test.h memory.c rnd_mode.c tests.c cmp_str.c random2.c
-$(top_builddir)/libmpfr.la:
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
+$(top_builddir)/src/libmpfr.la:
+ cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
TESTS = $(check_PROGRAMS)
TESTS_ENVIRONMENT = MPFR_QUIET=1
diff --git a/check_inits_clears b/tools/check_inits_clears
index 077d51961..f65ed8f39 100755
--- a/check_inits_clears
+++ b/tools/check_inits_clears
@@ -6,9 +6,10 @@
use strict;
use warnings;
use File::Find;
+use Cwd;
my $err = 0;
-find(\&wanted, '.');
+find(\&wanted, -d 'src' || getcwd() !~ m,/tools$, ? '.' : '..');
exit $err;
sub wanted
diff --git a/coverage b/tools/coverage
index e8df6d780..e8df6d780 100755
--- a/coverage
+++ b/tools/coverage
diff --git a/get_patches.sh b/tools/get_patches.sh
index 44347e23b..44347e23b 100755
--- a/get_patches.sh
+++ b/tools/get_patches.sh
diff --git a/mbench/Makefile b/tools/mbench/Makefile
index f9728903a..f9728903a 100644
--- a/mbench/Makefile
+++ b/tools/mbench/Makefile
diff --git a/mbench/README b/tools/mbench/README
index fa3823235..fa3823235 100644
--- a/mbench/README
+++ b/tools/mbench/README
diff --git a/mbench/generate.c b/tools/mbench/generate.c
index 1cccf8b8a..1cccf8b8a 100644
--- a/mbench/generate.c
+++ b/tools/mbench/generate.c
diff --git a/mbench/mfv5-arprec.cc b/tools/mbench/mfv5-arprec.cc
index 51cd291af..51cd291af 100644
--- a/mbench/mfv5-arprec.cc
+++ b/tools/mbench/mfv5-arprec.cc
diff --git a/mbench/mfv5-cln.cc b/tools/mbench/mfv5-cln.cc
index b01f4a70a..b01f4a70a 100644
--- a/mbench/mfv5-cln.cc
+++ b/tools/mbench/mfv5-cln.cc
diff --git a/mbench/mfv5-crlibm.cc b/tools/mbench/mfv5-crlibm.cc
index d898941af..d898941af 100644
--- a/mbench/mfv5-crlibm.cc
+++ b/tools/mbench/mfv5-crlibm.cc
diff --git a/mbench/mfv5-libc.cc b/tools/mbench/mfv5-libc.cc
index 301ab36a3..301ab36a3 100644
--- a/mbench/mfv5-libc.cc
+++ b/tools/mbench/mfv5-libc.cc
diff --git a/mbench/mfv5-lidia.cc b/tools/mbench/mfv5-lidia.cc
index bfba2fc4b..bfba2fc4b 100644
--- a/mbench/mfv5-lidia.cc
+++ b/tools/mbench/mfv5-lidia.cc
diff --git a/mbench/mfv5-mpf.cc b/tools/mbench/mfv5-mpf.cc
index a9048f834..a9048f834 100644
--- a/mbench/mfv5-mpf.cc
+++ b/tools/mbench/mfv5-mpf.cc
diff --git a/mbench/mfv5-mpfr.cc b/tools/mbench/mfv5-mpfr.cc
index 83b5edb56..83b5edb56 100644
--- a/mbench/mfv5-mpfr.cc
+++ b/tools/mbench/mfv5-mpfr.cc
diff --git a/mbench/mfv5-ntl.cc b/tools/mbench/mfv5-ntl.cc
index 7c32fcf11..7c32fcf11 100644
--- a/mbench/mfv5-ntl.cc
+++ b/tools/mbench/mfv5-ntl.cc
diff --git a/mbench/mfv5-pari.cc b/tools/mbench/mfv5-pari.cc
index ce020054f..ce020054f 100644
--- a/mbench/mfv5-pari.cc
+++ b/tools/mbench/mfv5-pari.cc
diff --git a/mbench/mfv5-void.cc b/tools/mbench/mfv5-void.cc
index 0372f9857..0372f9857 100644
--- a/mbench/mfv5-void.cc
+++ b/tools/mbench/mfv5-void.cc
diff --git a/mbench/mfv5.cc b/tools/mbench/mfv5.cc
index eaa2a76c1..eaa2a76c1 100644
--- a/mbench/mfv5.cc
+++ b/tools/mbench/mfv5.cc
diff --git a/mbench/mfv5.h b/tools/mbench/mfv5.h
index 253d2e23d..253d2e23d 100644
--- a/mbench/mfv5.h
+++ b/tools/mbench/mfv5.h
diff --git a/mbench/mpfr-gfx.c b/tools/mbench/mpfr-gfx.c
index aa66adc85..aa66adc85 100644
--- a/mbench/mpfr-gfx.c
+++ b/tools/mbench/mpfr-gfx.c
diff --git a/mbench/mpfr-v4.c b/tools/mbench/mpfr-v4.c
index 5a53ad10e..5a53ad10e 100644
--- a/mbench/mpfr-v4.c
+++ b/tools/mbench/mpfr-v4.c
diff --git a/mbench/mpfr-v6.c b/tools/mbench/mpfr-v6.c
index 8a1854c00..8a1854c00 100644
--- a/mbench/mpfr-v6.c
+++ b/tools/mbench/mpfr-v6.c
diff --git a/mbench/timp.h b/tools/mbench/timp.h
index 5b7ce6429..5b7ce6429 100644
--- a/mbench/timp.h
+++ b/tools/mbench/timp.h
diff --git a/mpfrlint b/tools/mpfrlint
index ed269e052..5401ef702 100755
--- a/mpfrlint
+++ b/tools/mpfrlint
@@ -2,30 +2,35 @@
# Check possible problems in the MPFR source.
-grep '^# *include *<math\.h>' *.c
+# mpfrlint can be run from the tools directory
+dir=`pwd`
+[ -d src ] || [ "`basename "$dir"`" != tools ] || cd ..
-grep -E 'mpfr_(underflow|overflow|nanflag|inexflag|erangeflag)_p' *.{c,h} | \
- grep -v '^exceptions.c:' | grep -v '^mpfr-impl.h:#define mpfr_.*_p()' | \
- grep -v '^mpfr.h:__MPFR_DECLSPEC '
+grep '^# *include *<math\.h>' src/*.c
-grep -E 'if +(test|\[).* == ' acinclude.m4 configure.in
-grep -E '="`' acinclude.m4 configure.in
+grep -E 'mpfr_(underflow|overflow|nanflag|inexflag|erangeflag)_p' src/*.{c,h} | \
+ grep -v '^src/exceptions.c:' | \
+ grep -v '^src/mpfr-impl.h:#define mpfr_.*_p()' | \
+ grep -v '^src/mpfr.h:__MPFR_DECLSPEC '
-grep GMP_LIMB_BITS {,tests/}*.{c,h}
+grep -E 'if +(test|\[).* == ' acinclude.m4 configure.ac
+grep -E '="`' acinclude.m4 configure.ac
-grep GMP_RND {,tests/}*.{c,h} | grep -v '#define GMP_RND'
+grep GMP_LIMB_BITS {src,tests}/*.{c,h}
+
+grep GMP_RND {src,tests}/*.{c,h} | grep -v '#define GMP_RND'
for i in exp prec rnd
do
- grep mp_${i}_t {,tests/}*.{c,h} | \
+ grep mp_${i}_t {src,tests}/*.{c,h} | \
grep -v "\(# *define\|# *ifndef\|typedef\) *mp_${i}_t" | \
grep -v "\[mp_${i}_t\]"
done
sp="[[:space:]]*"
-grep "MPFR_LOG_MSG$sp($sp($sp\".*\"$sp)$sp)$sp;" {,tests/}*.{c,h}
+grep "MPFR_LOG_MSG$sp($sp($sp\".*\"$sp)$sp)$sp;" {src,tests}/*.{c,h}
-for file in {,tests/}*.{c,h} {,tests/}Makefile.am acinclude.m4 configure.in
+for file in {src,tests}/*.{c,h} */Makefile.am acinclude.m4 configure.ac
do
# Note: this is one less that the POSIX minimum limit in case
# implementations are buggy like POSIX examples. :)
@@ -35,19 +40,17 @@ done
# In general, one needs to include mpfr-impl.h (note that some platforms
# such as MS Windows use a config.h, which is included by mpfr-impl.h).
-for file in *.c
+for file in src/*.c
do
- [ "$file" = ansi2knr.c ] || \
- [ "$file" = div-short.c ] || \
- [ "$file" = jyn_asympt.c ] || \
- [ "$file" = round_raw_generic.c ] || \
+ [ "$file" = src/jyn_asympt.c ] || \
+ [ "$file" = src/round_raw_generic.c ] || \
grep -q '^# *include *"\(mpfr-impl\|fits.*\|gen_inverse\)\.h"' $file || \
echo "Missing '#include \"mpfr-impl.h\"' in $file?"
done
-fdlv1="`sed -n '/Version / {s/.*Version //; s/,.*//; p; q}' fdl.texi`"
+fdlv1="`sed -n '/Version / {s/.*Version //; s/,.*//; p; q}' doc/fdl.texi`"
fdlv2="`sed -n '/GNU Free Documentation License/ \
- {s/.*Version //; s/ or.*//; p; q}' mpfr.texi`"
+ {s/.*Version //; s/ or.*//; p; q}' doc/mpfr.texi`"
[ "x$fdlv1" = "x$fdlv2" ] || cat <<EOF
GFDL versions differ:
fdl.texi: $fdlv1
@@ -56,19 +59,19 @@ EOF
# Note: if paragraphs are reformatted, this may need to be updated.
lgpl="`sed -n '/version [0-9.]\+ or any later version/ \
- {s/.*version //; s/ or.*//; p; q}' mpfr.texi`"
-for file in {,tests/}*.{c,h}
+ {s/.*version //; s/ or.*//; p; q}' doc/mpfr.texi`"
+for file in {src,tests}/*.{c,h}
do
- [ "$file" = "get_patches.c" ] && file="get_patches.sh"
+ [ "$file" = "src/get_patches.c" ] && file="tools/get_patches.sh"
if grep -q "GNU MPFR Library" "$file"; then
grep -q "either version $lgpl of the License" "$file" || \
echo "Possibly missing or incorrect copyright notice in $file"
fi
done
-texisvnd=`LC_ALL=C TZ=UTC svn info mpfr.texi 2> /dev/null | sed -n 's/Last Changed Date:.*, [0-9]* \([A-Z][a-z][a-z] [0-9][0-9][0-9][0-9]\)).*/\1/p'`
+texisvnd=`LC_ALL=C TZ=UTC svn info doc/mpfr.texi 2> /dev/null | sed -n 's/Last Changed Date:.*, [0-9]* \([A-Z][a-z][a-z] [0-9][0-9][0-9][0-9]\)).*/\1/p'`
if [ $? -eq 0 ] && [ -n "$texisvnd" ]; then
- texidate=`sed -n 's/@set UPDATED-MONTH \([A-Z][a-z][a-z]\).*\( [0-9][0-9][0-9][0-9]\)/\1\2/p' mpfr.texi`
+ texidate=`sed -n 's/@set UPDATED-MONTH \([A-Z][a-z][a-z]\).*\( [0-9][0-9][0-9][0-9]\)/\1\2/p' doc/mpfr.texi`
[ "$texidate" = "$texisvnd" ] || cat <<EOF
mpfr.texi's UPDATED-MONTH seems to be incorrect:
mpfr.texi's UPDATED-MONTH: $texidate
@@ -76,7 +79,7 @@ mpfr.texi's UPDATED-MONTH seems to be incorrect:
EOF
fi
-acv1="`sed -n 's/.*autoconf \([0-9.]\+\) (at least).*/\1/p' README.dev`"
+acv1="`sed -n 's/.*autoconf \([0-9.]\+\) (at least).*/\1/p' doc/README.dev`"
acv2="`sed -n 's/AC_PREREQ(\([0-9.]\+\).*/\1/p' acinclude.m4`"
[ "x$acv1" = "x$acv2" ] || cat <<EOF
autoconf minimal versions differ:
@@ -84,6 +87,7 @@ autoconf minimal versions differ:
acinclude.m4: $acv2
EOF
+cd "$dir"
"`dirname -- "$0"`"/check_inits_clears
true
diff --git a/nightly-test b/tools/nightly-test
index 3c5a620b5..3c5a620b5 100755
--- a/nightly-test
+++ b/tools/nightly-test
diff --git a/tools/update-patchv b/tools/update-patchv
new file mode 100755
index 000000000..ea04c3109
--- /dev/null
+++ b/tools/update-patchv
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Run this script from the top or tools directory to update some files
+# before a patch is built.
+
+set -e
+
+LC_ALL=C
+export LC_ALL
+
+if [ $# -ne 1 ]; then
+ echo >&2 "Usage: $0 <patchnumber>"
+ exit 1
+fi
+
+dir=`pwd`
+[ -d src ] || [ "`basename "$dir"`" != tools ] || cd ..
+
+replace()
+{
+ if [ ! -h "$2" ] && [ -r "$2" ] && [ -w "$2" ]; then
+ err=`perl -pi -e "$1" "$2" 2>&1 >/dev/null`
+ if [ -n "$err" ]; then
+ printf >&2 "Error from perl:\n%s\n" "$err"
+ exit 2
+ fi
+ else
+ printf >&2 "Error: %s is not a readable/writable file\n" "$2"
+ exit 2
+ fi
+}
+
+vers="`perl -pe 's/^(\d+\.\d+\.\d+).*/\1/' VERSION`"
+if [ -z "$vers" ]; then
+ echo >&2 "Error: could not get the current MPFR version"
+ exit 2
+fi
+
+full="${vers}-p$1"
+echo $full > VERSION
+
+replace "s/(?<=#define MPFR_VERSION_STRING ).*/\"$full\"/" src/mpfr.h
+replace "s/(?<=return \").*\"/$full\"/" src/version.c
+replace "s/(?<=#if ).*/0/" tests/tversion.c
+
+echo "MPFR version successfully updated."
diff --git a/update-version b/tools/update-version
index c07625321..1c4e0f4a2 100755
--- a/update-version
+++ b/tools/update-version
@@ -1,5 +1,7 @@
#!/bin/sh
+# Run this script from the top or tools directory to update the MPFR version.
+
set -e
LC_ALL=C
@@ -17,6 +19,9 @@ fi
# ./update-version 2 3 0
# ./update-version 2 3 0 p1 -
+dir=`pwd`
+[ -d src ] || [ "`basename "$dir"`" != tools ] || cd ..
+
replace()
{
if [ ! -h "$2" ] && [ -r "$2" ] && [ -w "$2" ]; then
@@ -33,20 +38,20 @@ replace()
vers="$1.$2.$3"
full="$vers${4:+-$4}"
-echo $full > VERSION
replace "s/(?<=#define MPFR_VERSION_MAJOR ).*/$1/; \
s/(?<=#define MPFR_VERSION_MINOR ).*/$2/; \
s/(?<=#define MPFR_VERSION_PATCHLEVEL ).*/$3/; \
- s/(?<=#define MPFR_VERSION_STRING ).*/\"$full\"/" mpfr.h
-replace "s/(?<=return \").*\"/$full\"/" version.c
+ s/(?<=#define MPFR_VERSION_STRING ).*/\"$full\"/" src/mpfr.h
+replace "s/(?<=return \").*\"/$full\"/" src/version.c
+echo $full > VERSION
if [ $# -lt 5 ]; then
# Up to 4 arguments...
u="http://www.mpfr.org/mpfr-"
- replace "s/(?<=\@set VERSION ).*/$full/" mpfr.texi
- replace \
- "s,MPFR [\d.]+( web page \@url{$u)[\d.]+/,MPFR $vers\${1}$vers/," mpfr.texi
- replace "s/(?<=AC_INIT).*/([MPFR],[$full])/" configure.in
+ replace "s/(?<=\@set VERSION ).*/$full/" doc/mpfr.texi
+ replace "s,MPFR [\d.]+( web page \@url{$u)[\d.]+/,MPFR $vers\${1}$vers/," \
+ doc/mpfr.texi
+ replace "s/(?<=AC_INIT).*/([MPFR],[$full])/" configure.ac
replace "s,(?<=$u).*?/,$vers/," INSTALL
fi
diff --git a/tune/Makefile.am b/tune/Makefile.am
new file mode 100644
index 000000000..a39af71cd
--- /dev/null
+++ b/tune/Makefile.am
@@ -0,0 +1,38 @@
+# Copyright 2010 Free Software Foundation, Inc.
+# This Makefile.am is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+EXTRA_PROGRAMS = tuneup speed bidimensional_sample
+
+tuneup_SOURCES = tuneup.c
+tuneup_LDADD = -lspeed $(top_builddir)/src/libmpfr.la
+tuneup_LDFLAGS = -static
+
+speed_SOURCES = speed.c
+speed_LDADD = -lspeed $(top_builddir)/src/libmpfr.la
+speed_LDFLAGS = -static
+
+bidimensional_sample_SOURCES = bidimensional_sample.c
+bidimensional_sample_LDADD = -lspeed $(top_builddir)/src/libmpfr.la
+bidimensional_sample_LDFLAGS = -static
+
+INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
+
+tune:
+ $(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
+ ./tuneup$(EXEEXT) -v
+ mv mparam.h $(top_builddir)/src/
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) clean
+ cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
+
+$(top_builddir)/src/libmpfr.la:
+ cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
+
+CLEANFILES = $(EXTRA_PROGRAMS) mparam.h
diff --git a/bidimensional_sample.c b/tune/bidimensional_sample.c
index f738e5b9c..f738e5b9c 100644
--- a/bidimensional_sample.c
+++ b/tune/bidimensional_sample.c
diff --git a/speed.c b/tune/speed.c
index 80969aedf..80969aedf 100644
--- a/speed.c
+++ b/tune/speed.c
diff --git a/tuneup.c b/tune/tuneup.c
index c60bd5c50..c60bd5c50 100644
--- a/tuneup.c
+++ b/tune/tuneup.c
diff --git a/update-patchv b/update-patchv
deleted file mode 100755
index 4b17aa606..000000000
--- a/update-patchv
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ $# -ne 1 ]; then
- echo "Usage: $0 <patchnumber>"
- exit 1
-fi
-
-vers="`perl -pe 's/^(\d+\.\d+\.\d+).*/\1/' VERSION`"
-full="${vers}-p$1"
-echo $full > VERSION
-perl -pi -e "s/(?<=#define MPFR_VERSION_STRING ).*/\"$full\"/" mpfr.h
-perl -pi -e "s/(?<=return \").*\"/$full\"/" version.c
-perl -pi -e "s/(?<=#if ).*/0/" tests/tversion.c
-
-echo "MPFR version successfully updated."