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

Commit

Permalink
Only silence rules when V=0
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Sep 27, 2016
1 parent 04aa4f7 commit 850eb86
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -15,7 +15,7 @@ build: all-build
%::
@if [ -x relocate-once.py ]; then ./relocate-once.py; fi
$(MAKE) build/make/Makefile
+@build/bin/sage-logger \
+build/bin/sage-logger \
"cd build/make && ./install '$@'" logs/install.log

# If configure was run before, rerun it with the old arguments.
Expand Down
20 changes: 14 additions & 6 deletions build/make/deps
Expand Up @@ -3,6 +3,14 @@
# $SAGE_ROOT/build/make/Makefile by $SAGE_ROOT/build/make/install
###############################################################################

# Silent rules
# https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html
ifeq ($(V), 0)
AM_V_at = @
else
AM_V_at =
endif

# We need to be able to override this to support ./sage -i -c PKG
SAGE_SPKG = sage-spkg

Expand Down Expand Up @@ -82,7 +90,7 @@ start: all-build
# sage-starts runs sage-location, which should be run after installing
# any package.
$(STARTED): $(STANDARD_PACKAGES)
@"$(SAGE_LOCAL)/bin/sage-starts"
$(AM_V_at)"$(SAGE_LOCAL)/bin/sage-starts"


###############################################################################
Expand Down Expand Up @@ -148,7 +156,7 @@ sagelib: \
$(inst_symmetrica) \
$(inst_zn_poly) \
$(EXTCODE)
@if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
$(AM_V_at)if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
sage-logger -p 'time $(MAKE) sage' '$(SAGE_LOGS)/sagelib-$(SAGE_VERSION).log'; \
fi
Expand Down Expand Up @@ -198,23 +206,23 @@ DOC_DEPENDENCIES = sagelib $(inst_sphinx) $(inst_sagenb) \
doc: doc-html

doc-html: $(DOC_DEPENDENCIES)
@cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
$(AM_V_at)cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log

# 'doc-html-no-plot': build docs without building the graphics coming
# from the '.. plot' directive, in case you want to save a few
# megabytes of disk space. 'doc-clean' is a prerequisite because the
# presence of graphics is cached in src/doc/output.
doc-html-no-plot: doc-clean $(DOC_DEPENDENCIES)
@cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links --no-plot all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
$(AM_V_at)cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links --no-plot all html $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log

doc-html-mathjax: $(DOC_DEPENDENCIES)
@cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html -j $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log
$(AM_V_at)cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html -j $(SAGE_DOCBUILD_OPTS)' logs/dochtml.log

# Keep target 'doc-html-jsmath' for backwards compatibility.
doc-html-jsmath: doc-html-mathjax

doc-pdf: $(DOC_DEPENDENCIES)
@cd ../.. && sage-logger -p './sage --docbuild all pdf $(SAGE_DOCBUILD_OPTS)' logs/docpdf.log
$(AM_V_at)cd ../.. && sage-logger -p './sage --docbuild all pdf $(SAGE_DOCBUILD_OPTS)' logs/docpdf.log

doc-clean: doc-src-clean doc-output-clean

Expand Down
10 changes: 6 additions & 4 deletions configure.ac
Expand Up @@ -933,10 +933,12 @@ while read PKG_NAME PKG_VERSION PKG_VAR; do
DEPS=""
fi
# Below we have to obscure A""M_V_at, or autoconf would complain:
# "error: possibly undefined macro: A""M_V_at"
if [ "$TYPE" = pip ]; then
# Special rules using PIP
echo >&7 "$PKG_NAME:$DEPS"
echo >&7 " @sage-logger -p 'sage --pip install $PKG_NAME' \$(SAGE_LOGS)/$PKG_NAME.log"
echo >&7 " \$(A""M_V_at)sage-logger -p 'sage --pip install $PKG_NAME' \$(SAGE_LOGS)/$PKG_NAME.log"
echo >&7
# Add a target to remove the "installed" file for "sage -f"
Expand All @@ -946,21 +948,21 @@ while read PKG_NAME PKG_VERSION PKG_VAR; do
elif [ "$TYPE" = script ]; then
# Just run the spkg-install script
echo >&7 "$PKG_NAME:$DEPS"
echo >&7 " @cd '$SAGE_ROOT' && \\"
echo >&7 " \$(A""M_V_at)cd '$SAGE_ROOT' && \\"
echo >&7 " source '$SAGE_ROOT/src/bin/sage-env' && \\"
echo >&7 " sage-logger -p '$SAGE_ROOT/build/pkgs/$PKG_NAME/spkg-install' \$(SAGE_LOGS)/$PKG_NAME.log"
echo >&7
# Just run the spkg-uninstall script if it exists
echo >&7 "$PKG_NAME-clean:"
echo >&7 " -@cd '$SAGE_ROOT' && \\"
echo >&7 " -\$(A""M_V_at)cd '$SAGE_ROOT' && \\"
echo >&7 " source '$SAGE_ROOT/src/bin/sage-env' && \\"
echo >&7 " '$SAGE_ROOT/build/pkgs/$PKG_NAME/spkg-uninstall'"
echo >&7
else
# Normal Sage packages
echo >&7 "\$(INST)/$PKG_VERSION:$DEPS"
echo >&7 " +@sage-logger -p '\$(SAGE_SPKG) $PKG_VERSION' '\$(SAGE_LOGS)/$PKG_VERSION.log'"
echo >&7 " +\$(A""M_V_at)sage-logger -p '\$(SAGE_SPKG) $PKG_VERSION' '\$(SAGE_LOGS)/$PKG_VERSION.log'"
echo >&7
# Add a target with just the bare package name for "sage -i"
Expand Down

0 comments on commit 850eb86

Please sign in to comment.