Skip to content

Commit

Permalink
Makefile: Fix definition of SPKG_COLLECT_FILES
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 8, 2024
1 parent 12a9385 commit 8526c3e
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,24 @@ 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
# 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)
@if [ -x config.status ]; then \
case '$?' in \
*configure*) \
$(MAKE) reconfigure;; \
*) \
./config.status;; \
esac; \
else \
$(MAKE) reconfigure; \
@if [ -x config.status ]; then \
case '$?' in \
*configure*|*package-version*|*dependencies*) \
$(MAKE) reconfigure;; \
*) \
./config.status;; \
esac; \
else \
$(MAKE) reconfigure; \
fi

reconfigure:
Expand Down Expand Up @@ -335,7 +336,14 @@ 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

install: all
Expand Down

0 comments on commit 8526c3e

Please sign in to comment.