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

Commit

Permalink
Trac #30153: factor out $(1)-no-deps targets in build/make/Makefile.in.
Browse files Browse the repository at this point in the history
The no-deps package targets in build/make/Makefile.in are duplicates
of what I shall refer to as the "yes-deps" targets. Instead of
manually synchronizing the two which differ only in their
prerequisites, this commit changes the yes-deps targets to run $(MAKE)
on the no-deps targets after building the deps.
  • Loading branch information
orlitzky committed Jul 17, 2020
1 parent 830843b commit 1a0e5c3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ pkg_deps = \
# rules in the form:
#
# $(INST)/<pkgname>-<pkgvers>: <dependencies>
# +$(AM_V_at)sage-logger -p '$(SAGE_SPKG) <pkgname>-<pkgvers>' '$(SAGE_LOGS)/<pkgname>-<pkgvers>.log'
# $(MAKE) $(1)-no-deps
#
# <pkgname>: $(INST)/<pkgname>-<pkgvers>
#
Expand Down Expand Up @@ -431,9 +431,7 @@ define NORMAL_PACKAGE_templ
$(1)-build-deps: $(3)

$$(INST)/$(1)-$(2): $(3)
+$(AM_V_at)sage-logger -p '$$(SAGE_SPKG) $$(SAGE_SPKG_OPTIONS) \
$(if $(filter $(1),$(TOOLCHAIN_DEPS)),--keep-existing) \
$(1)-$(2)' '$$(SAGE_LOGS)/$(1)-$(2).log'
$(MAKE) $(1)-no-deps

$(1): $$(INST)/$(1)-$(2)

Expand Down Expand Up @@ -477,7 +475,7 @@ define PIP_PACKAGE_templ
$(1)-build-deps: $(2)

$(1): $(2)
$(AM_V_at)sage-logger -p 'sage --pip install -r "$$(SAGE_ROOT)/build/pkgs/$(1)/requirements.txt"' '$$(SAGE_LOGS)/$(1).log'
$(MAKE) $(1)-no-deps

$(1)-no-deps:
$(AM_V_at)sage-logger -p 'sage --pip install -r "$$(SAGE_ROOT)/build/pkgs/$(1)/requirements.txt"' '$$(SAGE_LOGS)/$(1).log'
Expand Down Expand Up @@ -523,12 +521,7 @@ define SCRIPT_PACKAGE_templ
$(1)-build-deps: $(3)

$$(INST)/$(1)-$(2): $(3)
$(AM_V_at)cd '$$(SAGE_ROOT)/build/pkgs/$(1)' && \
. '$$(SAGE_ROOT)/src/bin/sage-env-config' && \
. '$$(SAGE_ROOT)/src/bin/sage-env' && \
. '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \
sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log'
touch "$$@"
$(MAKE) $(1)-no-deps

$(1): $$(INST)/$(1)-$(2)

Expand Down

0 comments on commit 1a0e5c3

Please sign in to comment.