Changeset 30911


Ignore:
Timestamp:
Apr 9, 2008, 3:03:38 AM (16 years ago)
Author:
1gray
Message:

Makefile (default): Use the `ERRORLOG' variable instead of constructing
the `error.log' filename manually.
(distclean): Likewise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/Makefile

    r30673 r30911  
    8080
    8181default: builddemolocation
    82         @echo "GRASS GIS compilation log"     > $(GRASS_HOME)/error.log
    83         @echo "-------------------------"    >> $(GRASS_HOME)/error.log
    84         @echo "Started compilation: `date`"  >> $(GRASS_HOME)/error.log
    85         @echo "--"                           >> $(GRASS_HOME)/error.log
    86         @echo "Errors in:"                   >> $(GRASS_HOME)/error.log
     82        @echo "GRASS GIS compilation log"     > $(ERRORLOG)
     83        @echo "-------------------------"    >> $(ERRORLOG)
     84        @echo "Started compilation: `date`"  >> $(ERRORLOG)
     85        @echo "--"                           >> $(ERRORLOG)
     86        @echo "Errors in:"                   >> $(ERRORLOG)
    8787        chmod 744 install-sh
    8888        @list='$(SUBDIRS)'; \
     
    9494        -cp -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp
    9595        @(cd tools ; sh -c "./build_html_index.sh")
    96         @if [ `cat "$(GRASS_HOME)/error.log" | wc -l` -gt 5 ] ; then \
    97                 echo "--"     >> $(GRASS_HOME)/error.log ; \
    98                 echo "In case of errors please change into the directory with error and run 'make'." >> $(GRASS_HOME)/error.log ; \
    99                 echo "If you get multiple errors, you need to deal with them in the order they"      >> $(GRASS_HOME)/error.log ; \
    100                 echo "appear in the error log. If you get an error building a library, you will"     >> $(GRASS_HOME)/error.log ; \
    101                 echo "also get errors from anything which uses the library."  >> $(GRASS_HOME)/error.log ; \
     96        @if [ `cat "$(ERRORLOG)" | wc -l` -gt 5 ] ; then \
     97                echo "--"     >> $(ERRORLOG) ; \
     98                echo "In case of errors please change into the directory with error and run 'make'." >> $(ERRORLOG) ; \
     99                echo "If you get multiple errors, you need to deal with them in the order they"      >> $(ERRORLOG) ; \
     100                echo "appear in the error log. If you get an error building a library, you will"     >> $(ERRORLOG) ; \
     101                echo "also get errors from anything which uses the library."  >> $(ERRORLOG) ; \
    102102        else \
    103                 echo "No errors detected." >> $(GRASS_HOME)/error.log ; \
     103                echo "No errors detected." >> $(ERRORLOG) ; \
    104104        fi
    105         @echo "--"  >> $(GRASS_HOME)/error.log
    106         @echo "Finished compilation: `date`" >> $(GRASS_HOME)/error.log
    107         @cat $(GRASS_HOME)/error.log
    108         @if [ `cat "$(GRASS_HOME)/error.log" | wc -l` -gt 8 ] ; then false ; else true ; fi
     105        @echo "--"  >> $(ERRORLOG)
     106        @echo "Finished compilation: `date`" >> $(ERRORLOG)
     107        @cat $(ERRORLOG)
     108        @if [ `cat "$(ERRORLOG)" | wc -l` -gt 8 ] ; then false ; else true ; fi
    109109
    110110LIBDIRS = \
     
    182182distclean: clean
    183183        -rm -f config.cache config.log config.status config.status.${ARCH} 2>/dev/null
    184         -rm -f ChangeLog ChangeLog.bak error.log grass.pc
     184        -rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
    185185        -rm -f include/config.h include/version.h include/winname.h include/Make/Grass.make include/Make/Platform.make 2>/dev/null
    186186        -rm -f swig/perl/Makefile.PL swig/perl2/make.pl swig/python/Makefile 2>/dev/null
Note: See TracChangeset for help on using the changeset viewer.