#10491: Dump environment before building
-----------------------------+----------------------------------------------
 Reporter:  jdemeyer         |         Owner:  GeorgSWeber                      
       
     Type:  enhancement      |        Status:  closed                           
       
 Priority:  minor            |     Milestone:  sage-4.6.1                       
       
Component:  scripts          |    Resolution:  fixed                            
       
 Keywords:  scripts install  |        Author:  Jeroen Demeyer                   
       
 Upstream:  N/A              |      Reviewer:  Volker Braun                     
       
   Merged:  sage-4.6.1.rc0   |   Work_issues:  Don't always dump the whole 
environment.
-----------------------------+----------------------------------------------

Comment(by leif):

 You could also do (one of or some other combination of) the following:
 {{{
 #!diff
 --- Makefile.orig       2010-12-24 13:39:58.000000000 +0100
 +++ Makefile    2010-12-27 02:38:20.000000000 +0100
 @@ -43,7 +43,7 @@
  #      test -x $@ # or make it executable if it exists; sanity check only
 anyway

  build: $(PIPE)
 -       cd spkg && "../$(PIPE)" "./install all 2>&1" "tee -a
 ../install.log"
 +       cd spkg && env MAKECMDGOALS="$(MAKECMDGOALS)" "../$(PIPE)"
 "./install all 2>&1" "tee -a ../install.log"

  doc: doc-html

 --- spkg/install.orig   2010-12-26 23:28:59.000000000 +0100
 +++ spkg/install        2010-12-27 03:10:04.000000000 +0100
 @@ -432,10 +432,26 @@
  export ZNPOLY


 -# Dump environment for debugging purposes:
 -echo "*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***"
 -env
 -echo "***********************************************"
 +# Skip the rest if nothing to do (i.e., to [re]build):
 +# (Note that we should use $MAKE here, but we currently don't use
 +# it further below either unless SAGE_PARALLEL_SPKG_BUILD=yes, which
 +# I consider a "bug".)
 +if make -q -f standard/deps $1; then
 +    echo
 +    echo "Nothing to (re)build / all up-to-date."
 +    echo
 +    exit 0
 +fi
 +
 +# ALTERNATIVELY:
 +
 +# Only dump the environment when 'make' or 'make build' was issued:
 +if ! echo $MAKECMDGOALS | egrep "doc|test" >/dev/null; then
 +    # Dump environment for debugging purposes:
 +    echo "*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***"
 +    env
 +    echo "***********************************************"
 +fi


 ###############################################################################
 }}}

 ----

 P.S.: I did not know you are the copyright owner of our rewritten
 `pipestatus`... ;-)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10491#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to