From 9f961994f66bc50c9537912d16a7d63e85e185cb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 28 Aug 2024 14:16:08 +0200 Subject: [PATCH] libgmp-mpz: New module, renamed from libgmp. * modules/libgmp-mpz: Renamed from modules/libgmp. * modules/libgmp: New file. * modules/libgmp-mpz-tests: Renamed from modules/libgmp-tests. * tests/test-libgmp-mpz.c: Renamed from tests/test-libgmp.c. --- ChangeLog | 8 +++ modules/libgmp | 38 ++------------- modules/libgmp-mpz | 57 ++++++++++++++++++++++ modules/libgmp-mpz-tests | 14 ++++++ modules/libgmp-tests | 14 ------ tests/{test-libgmp.c => test-libgmp-mpz.c} | 0 6 files changed, 82 insertions(+), 49 deletions(-) create mode 100644 modules/libgmp-mpz create mode 100644 modules/libgmp-mpz-tests delete mode 100644 modules/libgmp-tests rename tests/{test-libgmp.c => test-libgmp-mpz.c} (100%) diff --git a/ChangeLog b/ChangeLog index 8a7f812b67..0d9bf43966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-08-28 Bruno Haible + + libgmp-mpz: New module, renamed from libgmp. + * modules/libgmp-mpz: Renamed from modules/libgmp. + * modules/libgmp: New file. + * modules/libgmp-mpz-tests: Renamed from modules/libgmp-tests. + * tests/test-libgmp-mpz.c: Renamed from tests/test-libgmp.c. + 2024-08-28 Bruno Haible doc: Add more details about O_EXEC and O_SEARCH. diff --git a/modules/libgmp b/modules/libgmp index b8a7c0c32a..0668b6c3cb 100644 --- a/modules/libgmp +++ b/modules/libgmp @@ -1,47 +1,15 @@ Description: -GNU Multiple Precision Arithmetic library, or its mini-gmp substitute +GNU Multiple Precision Arithmetic library, +or its mini-gmp + mini-mpq substitute Files: -lib/mini-gmp-gnulib.c -lib/mini-gmp.c -lib/mini-gmp.h -m4/libgmp.m4 Depends-on: +libgmp-mpz configure.ac: -gl_LIBGMP -gl_CONDITIONAL_HEADER([gmp.h]) -AC_PROG_MKDIR_P -gl_CONDITIONAL([GL_COND_OBJ_MINI_GMP_GNULIB], [test $HAVE_LIBGMP != yes]) Makefile.am: -BUILT_SOURCES += $(GMP_H) - -if GL_GENERATE_GMP_H -if GL_GENERATE_MINI_GMP_H -# Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp. -gmp.h: $(top_builddir)/config.status -@NMD@ $(MKDIR_P) '%reldir%' - echo '#include "mini-gmp.h"' > $@-t - mv $@-t $@ -endif -if GL_GENERATE_GMP_GMP_H -# Build gmp.h as a wrapper for gmp/gmp.h. -gmp.h: $(top_builddir)/config.status -@NMD@ $(MKDIR_P) '%reldir%' - echo '#include ' > $@-t - mv $@-t $@ -endif -else -gmp.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += gmp.h gmp.h-t - -if GL_COND_OBJ_MINI_GMP_GNULIB -lib_SOURCES += mini-gmp-gnulib.c -endif Include: diff --git a/modules/libgmp-mpz b/modules/libgmp-mpz new file mode 100644 index 0000000000..4104e79cba --- /dev/null +++ b/modules/libgmp-mpz @@ -0,0 +1,57 @@ +Description: +GNU Multiple Precision Arithmetic library (mpn_*, mpz_* part), +or its mini-gmp substitute + +Files: +lib/mini-gmp-gnulib.c +lib/mini-gmp.c +lib/mini-gmp.h +m4/libgmp.m4 + +Depends-on: + +configure.ac: +gl_LIBGMP +gl_CONDITIONAL_HEADER([gmp.h]) +AC_PROG_MKDIR_P +gl_CONDITIONAL([GL_COND_OBJ_MINI_GMP_GNULIB], [test $HAVE_LIBGMP != yes]) + +Makefile.am: +BUILT_SOURCES += $(GMP_H) + +if GL_GENERATE_GMP_H +if GL_GENERATE_MINI_GMP_H +# Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp. +gmp.h: $(top_builddir)/config.status +@NMD@ $(MKDIR_P) '%reldir%' + echo '#include "mini-gmp.h"' > $@-t + mv $@-t $@ +endif +if GL_GENERATE_GMP_GMP_H +# Build gmp.h as a wrapper for gmp/gmp.h. +gmp.h: $(top_builddir)/config.status +@NMD@ $(MKDIR_P) '%reldir%' + echo '#include ' > $@-t + mv $@-t $@ +endif +else +gmp.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += gmp.h gmp.h-t + +if GL_COND_OBJ_MINI_GMP_GNULIB +lib_SOURCES += mini-gmp-gnulib.c +endif + +Include: + + +Link: +$(LTLIBGMP) when linking with libtool, $(LIBGMP) otherwise + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/libgmp-mpz-tests b/modules/libgmp-mpz-tests new file mode 100644 index 0000000000..d1af386f03 --- /dev/null +++ b/modules/libgmp-mpz-tests @@ -0,0 +1,14 @@ +Files: +tests/macros.h +tests/test-libgmp-mpz.c + +Depends-on: +assert-h +c99 + +configure.ac: + +Makefile.am: +TESTS += test-libgmp-mpz +check_PROGRAMS += test-libgmp-mpz +test_libgmp_mpz_LDADD = $(LDADD) @LIBGMP@ diff --git a/modules/libgmp-tests b/modules/libgmp-tests deleted file mode 100644 index b0cb73d1f4..0000000000 --- a/modules/libgmp-tests +++ /dev/null @@ -1,14 +0,0 @@ -Files: -tests/macros.h -tests/test-libgmp.c - -Depends-on: -assert-h -c99 - -configure.ac: - -Makefile.am: -TESTS += test-libgmp -check_PROGRAMS += test-libgmp -test_libgmp_LDADD = $(LDADD) @LIBGMP@ diff --git a/tests/test-libgmp.c b/tests/test-libgmp-mpz.c similarity index 100% rename from tests/test-libgmp.c rename to tests/test-libgmp-mpz.c -- 2.39.5