1# Copyright 2000-2023 Free Software Foundation, Inc. 2# Contributed by the AriC and Caramba projects, INRIA. 3 4# This file is part of the GNU MPFR Library. 5 6# This Makefile.am is free software; the Free Software Foundation 7# gives unlimited permission to copy and/or distribute it, 8# with or without modifications, as long as this notice is preserved. 9 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13# PARTICULAR PURPOSE. 14 15 16# Warning! Do not add rules for DISTFILES files (such as ChangeLog), 17# because GNU Automake will create a "distdir-am: $(DISTFILES)" rule, 18# which could regenerate such files, and this is not allowed as this 19# changes files from the source directory; for this reason, this 20# makes "make distcheck" fail. To update the ChangeLog file, use 21# "make update-changelog" or run the tools/update-changelog script 22# directly. 23 24 25# The ".POSIX" line is needed in particular for GNU "make", so that 26# recipes are invoked as if the shell had been passed the -e flag. 27# But note that since GNU Automake adds non-comment lines before it 28# in its generated Makefile, this does not ensure POSIX behavior with 29# other "make" implementations. 30.POSIX: 31 32AUTOMAKE_OPTIONS = gnu 33 34# ACLOCAL_AMFLAGS will be fully deprecated in Automake 2.0; 35# AC_CONFIG_MACRO_DIRS (introduced in Automake 1.13) is now used instead, 36# but we still set ACLOCAL_AMFLAGS to avoid a warning message from 37# libtoolize and in case some developer needs to switch back to an 38# old Automake version. 39ACLOCAL_AMFLAGS = -I m4 40 41SUBDIRS = doc src tests tune tools/bench 42 43pkgconfigdir = $(libdir)/pkgconfig 44pkgconfig_DATA = mpfr.pc 45 46nobase_dist_doc_DATA = AUTHORS BUGS COPYING COPYING.LESSER NEWS TODO \ 47 examples/ReadMe examples/can_round.c examples/divworst.c \ 48 examples/rndo-add.c examples/sample.c examples/threads.c \ 49 examples/version.c 50 51# Note: The version-ext.sh script is normally no longer needed because 52# the output_info code in tests/Makefile.am now executes this script 53# only if $(top_srcdir)/.git exists and is readable, but this should 54# not occur in a tarball (built based on EXTRA_DIST), unless someone 55# has modified it for some reason. But since this script is small, we 56# distribute it just in case it would be used. 57EXTRA_DIST = PATCHES VERSION doc/README.dev doc/check-typography doc/mini-gmp \ 58 tools/check_mparam.c tools/ck-clz_tab tools/ck-copyright-notice \ 59 tools/ck-mparam tools/ck-news tools/ck-version-info tools/get_patches.sh \ 60 version-ext.sh $(DATAFILES) 61 62bench: 63 cd tools/bench && $(MAKE) $(AM_MAKEFLAGS) bench 64 65# Various checks for "make dist" / "make distcheck". 66# Warning! With "make distcheck", neither the top-level directory nor 67# the tools directory is writable. 68# * Check consistency concerning -version-info. Moreover if the VERSION 69# file doesn't end with "-dev", check that the -version-info value is 70# up-to-date. Note: this is a heuristic, to detect some mistakes. 71# * Check that copyright notices exist and appear to be correct. 72# * Check the NEWS file. 73# * Check the __clz_tab sizes. 74# * Check the mparam.h files. 75# * Check typography in mpfr.texi (Texinfo rules). 76dist-hook: 77 cd $(srcdir) && tools/ck-version-info 78 cd $(srcdir) && tools/ck-copyright-notice 79 cd $(srcdir) && tools/ck-news 80 cd $(srcdir) && tools/ck-clz_tab 81 $(srcdir)/tools/ck-mparam 82 cd $(srcdir)/doc && ./check-typography 83 84# Check that MPFR does not use GMP internal symbols. Of course, do not run 85# this rule if you use --with-gmp-build or --enable-gmp-internals. 86# This test does nothing if no libmpfr.so is generated. 87check-gmp-symbols: 88 cd src && $(MAKE) check-gmp-symbols 89 90# Check that MPFR does not define symbols with a GMP reserved prefix. 91# This test does nothing if no libmpfr.so is generated. 92check-exported-symbols: 93 cd src && $(MAKE) check-exported-symbols 94 95update-changelog: 96 cd $(srcdir) && tools/update-changelog 97 98.PHONY: check-gmp-symbols check-exported-symbols update-changelog 99