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

Rerun configure less often #37127

Merged
merged 4 commits into from
Mar 25, 2024
Merged
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
44 changes: 37 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,25 @@ SAGE_ROOT_LOGS = logs
# except for build/make/Makefile-auto, which is unused by the build system
CONFIG_FILES = build/make/Makefile src/bin/sage-env-config build/bin/sage-build-env-config pkgs/sage-conf/_sage_conf/_conf.py

# SPKG_COLLECT_FILES contains all files that influence the SAGE_SPKG_COLLECT macro
SPKG_COLLECT_FILES = build/pkgs/*/type build/pkgs/*/package-version.txt build/pkgs/*/dependencies build/pkgs/*/requirements.txt build/pkgs/*/checksums.ini build/pkgs/*/spkg-install

# If configure was run before, rerun it with the old arguments.
# Otherwise, run configure with argument $PREREQ_OPTIONS.
# SPKG_COLLECT_FILES contains the files that influence the *runtime* of the
# portions of the 'configure' script generated by the SAGE_SPKG_COLLECT macro
SPKG_COLLECT_FILES = build/pkgs/*/package-version.txt build/pkgs/*/dependencies*

# If configure was not run before, complain.
# If configure is newer than the files it generated (we test build/make/Makefile),
# we regenerate config.status by running the "config.status --recheck".
# Either way we regenerate the generated files by calling "config.status".
build/make/Makefile: configure $(SPKG_COLLECT_FILES) $(CONFIG_FILES:%=%.in)
$(MAKE) reconfigure
@if [ -x config.status ]; then \
case '$?' in \
*configure*|*package-version*|*dependencies*) \
$(MAKE) reconfigure;; \
*) \
./config.status;; \
esac; \
else \
$(MAKE) reconfigure; \
fi

reconfigure:
rm -f config.log
Expand Down Expand Up @@ -324,7 +336,25 @@ ptestoptionallong-nodoc:

###############################################################################

configure: bootstrap src/doc/bootstrap configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4 build/pkgs/*/type build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt build/pkgs/*/distros/*.txt
# The 'configure' script is just one of the files generated by 'bootstrap'.
# CONFIGURE_DEPENDENCIES is the list of files that influence the generation of 'configure'.
CONFIGURE_DEPENDENCIES = \
configure.ac src/bin/sage-version.sh m4/*.m4 \
build/pkgs/*/spkg-configure.m4 \
build/pkgs/*/type build/pkgs/*/SPKG.rst \
build/pkgs/*/checksums.ini build/pkgs/*/requirements.txt \
build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt \
build/pkgs/*/spkg-install build/pkgs/*/spkg-install.in

# SPKG_INFO_DEPENDENCIES is the list of files that influence the run of 'sage-spkg-info' and hence
# the generation of the files generated in 'src/doc' by 'src/doc/bootstrap'.
SPKG_INFO_DEPENDENCIES = \
build/pkgs/*/type build/pkgs/*/SPKG.rst \
build/pkgs/*/requirements.txt \
build/pkgs/*/install-requires.txt build/pkgs/*/package-version.txt \
build/pkgs/*/distros/*.txt

configure: bootstrap src/doc/bootstrap $(CONFIGURE_DEPENDENCIES) $(SPKG_INFO_DEPENDENCIES)
./bootstrap -d

kwankyu marked this conversation as resolved.
Show resolved Hide resolved
install: all
Expand Down
Loading