Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some rules to regenerate parts of the build system if needed #1527

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,45 @@ endif
$(RM_F) $(LIBDIR)/$(FLINT_LIB_STATIC)
$(RM_RF) $(INCLUDEDIR)/flint

################################################################################
# regenerate part of the build system of needed
################################################################################

ifneq ($(MAINTAINER_MODE),no) # disable this for releases?
ifneq ($(shell command -v autoconf 2> /dev/null),)
configure: configure.ac
@echo "Running autoconf"
@autoconf
else
configure: configure.ac
$(warning autoconf not available, proceeding with stale configure)
endif
endif

config.status: configure
./config.status --recheck

Makefile: Makefile.in config.status
./config.status $@

flint.pc: flint.pc.in config.status
./config.status $@

src/flint.h: src/flint.h.in config.status
./config.status $@

libtool: config.status
./config.status $@

src/fft_tuning.h: @FFT_TUNING_IN@ config.status
./config.status $@

src/fmpz/fmpz.c: @FMPZ_C_IN@ config.status
./config.status $@

src/gmpcompat.h: src/@GMPCOMPAT_H_IN@ config.status
./config.status $@

################################################################################
# maintainer stuff
################################################################################
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ case "$host_cpu" in
;;
esac
AC_CONFIG_FILES([src/fft_tuning.h:$fft_tuning_in],[],[fft_tuning_in="$fft_tuning_in"])
AC_SUBST(FFT_TUNING_IN, $fft_tuning_in)

if test -z "$LDCONFIG";
then
Expand Down Expand Up @@ -643,6 +644,7 @@ AC_COMPILE_IFELSE(
gmpcompat_h_in="gmpcompat.h.in")

AC_CONFIG_FILES([src/gmpcompat.h:src/$gmpcompat_h_in],[],[gmpcompat_h_in="$gmpcompat_h_in"])
AC_SUBST(GMPCOMPAT_H_IN, $gmpcompat_h_in)

# Check that MPFR >= 4.1.0
AC_MSG_CHECKING([if version of MPFR is greater than 4.1.0])
Expand Down Expand Up @@ -1102,6 +1104,7 @@ else
fi

AC_CONFIG_FILES([src/fmpz/fmpz.c:$fmpz_c],[],[fmpz_c="$fmpz_c"])
AC_SUBST(FMPZ_C_IN, $fmpz_c)

if test "$enable_shared" = "yes";
then
Expand Down