Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 30153: add, clarify some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpalmieri committed Jul 16, 2020
1 parent 62ddd02 commit 830843b
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ SCRIPT_PACKAGES = @SAGE_SCRIPT_PACKAGES@
#
# For example:
#
# inst_python2 = $(INST)/python2-$(vers_python2)
# inst_python3 = $(INST)/python3-$(vers_python3)
#
# inst_git = $(INST)/.dummy

Expand Down Expand Up @@ -360,11 +360,11 @@ _clean-broken-gcc:
# Define a function for generating the list of a package's dependencies
# as $(inst_<pkgname>) variables. For example, takes:
#
# deps_cysignals = python2 cython pari | pip
# deps_cysignals = python3 cython pari | pip
#
# to:
#
# $(inst_python2) $(inst_cython) $(inst_pari) | $(inst_pip)
# $(inst_python3) $(inst_cython) $(inst_pari) | $(inst_pip)
#
# If some value in the dependencies list is not a package name (e.g. it is
# the name of some arbitrary file, or it is the '|' symbol) then it is just
Expand All @@ -382,25 +382,35 @@ pkg_deps = \

# ============================= normal packages ==============================
# Generate build rules for 'normal' packages; this template is used to generate
# three rules in the form:
# rules in the form:
#
# $(INST)/<pkgname>-<pkgvers>: <dependencies>
# +$(AM_V_at)sage-logger -p '$(SAGE_SPKG) <pkgname>-<pkgvers>' '$(SAGE_LOGS)/<pkgname>-<pkgvers>.log'
#
# <pkgname>: $(INST)/<pkgname>-<pkgvers>
#
# <pkgname>-build-deps: <dependencies>
#
# <pkgname>-no-deps:
# +$(AM_V_at)sage-logger -p '$(SAGE_SPKG) <pkgname>-<pkgvers>' '$(SAGE_LOGS)/<pkgname>-<pkgvers>.log'
#
# <pkgname>-clean:
# sage-spkg-uninstall <pkgname> '$(SAGE_LOCAL)'
#
# For example, for python2 this will expand to:
# So <pkgname>-build-deps installs just the dependencies, while
# <pkgname>-no-deps tries to install the package without its
# dependencies. This is currently used in SAGE_SRC/bin/sage when
# running 'sage -b' to build the Sage library.
#
# For example, for python3 this will expand to:
#
# $(INST)/python2-2.7.14: $(inst_zlib) $(inst_readline) $(inst_sqlite) $(inst_libpng) $(inst_bzip2)
# +$(AM_V_at)sage-logger -p '$(SAGE_SPKG) python2-2.7.14' '$(SAGE_LOGS)/python2-2.7.14.log'
# $(INST)/python3-3.7.3: $(inst_zlib) $(inst_readline) $(inst_sqlite) $(inst_libpng) $(inst_bzip2) $(inst_xz) $(inst_libffi)
# +$(AM_V_at)sage-logger -p '$(SAGE_SPKG) python3-3.7.3' '$(SAGE_LOGS)/python3-3.7.3.log'
#
# python2: $(INST)/python2-2.7.14
# python3: $(INST)/python3-3.7.3
#
# python2-clean:
# sage-spkg-uninstall python2 '$(SAGE_LOCAL)'
# python3-clean:
# sage-spkg-uninstall python3 '$(SAGE_LOCAL)'
#
# Note: In these rules the $(INST)/<pkgname>-<pkgvers> target is used
# explicitly, rather than expanding the $(inst_<pkgname>) variable, since
Expand Down Expand Up @@ -475,7 +485,7 @@ $(1)-no-deps:
$(1)-clean:
-sage --pip uninstall -y -r '$$(SAGE_ROOT)/build/pkgs/$(1)/requirements.txt'

.PHONY: $(1) $(1)-clean $(1)-build-deps $(1)-no-deps $(1)-clean
.PHONY: $(1) $(1)-clean $(1)-build-deps $(1)-no-deps
endef

$(foreach pkgname,$(PIP_PACKAGES),\
Expand Down

0 comments on commit 830843b

Please sign in to comment.