--- loncom/build/Makefile.cvs 2002/01/08 00:01:22 1.2 +++ loncom/build/Makefile.cvs 2003/02/03 18:03:52 1.9 @@ -1,10 +1,10 @@ # The LearningOnline Network with CAPA -# Scott Harrison -# $Id: Makefile.cvs,v 1.2 2002/01/08 00:01:22 harris41 Exp $ +# $Id: Makefile.cvs,v 1.9 2003/02/03 18:03:52 harris41 Exp $ STATDIR="loncom/build/cvsstats" STATSUBDIR="cvsstats" +TIMEAGO=7 help: @echo "*** You need to specify a valid target ***" @@ -13,6 +13,8 @@ help: @echo " LON-CAPA archiving" @echo "linesofcode: look at the number of unique lines of code since" @echo " LON-CAPA archiving" + @echo "statpage: an HTML formatted presentation of cvscommit and" + @echo " linesofcode" @echo "Information is placed inside CVS:loncom/build/cvsstats" cvsreport: @@ -20,50 +22,41 @@ cvsreport: echo "

Automatically generated CVS report

" > \ ../../doc/build/cvsreport.html # General Date Info - echo "

LON-CAPA Software Changes from `date --date='7 days ago' \ + echo "

LON-CAPA Software Changes from \ + `date --date='$(TIMEAGO) days ago' \ +\"%Y-%m-%d\"` to `date +\"%Y-%m-%d\"`

" >> \ ../../doc/build/cvsreport.html # General Alteration Info echo "

Number of altered files:" >> ../../doc/build/cvsreport.html - cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" \ - loncom CAPA doc packaging 2>/dev/null | perl \ + cd ../..; cvs log \ + -d ">`date --date='$(TIMEAGO) days ago' +\"%Y-%m-%d\"`" \ + loncom CAPA doc 2>/dev/null | perl \ loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- | \ wc -l >> doc/build/cvsreport.html # Listing of Altered Files echo "

Altered files:

" >> \
 	../../doc/build/cvsreport.html
-	cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" \
-	loncom CAPA doc packaging 2>/dev/null | \
+	cd ../..; cvs log \
+	-d ">`date --date='$(TIMEAGO) days ago' +\"%Y-%m-%d\"`" \
+	loncom CAPA doc 2>/dev/null | \
 	perl loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- \
 	>> doc/build/cvsreport.html
-	# Log entries for loncom
-	echo "

Log entries for loncom:

" >> \
-	../../doc/build/cvsreport.html
-	cd ../../loncom; cvs log -d ">`date --date='8 days ago' \
-	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
-	../doc/build/cvsreport.html
-	# Log entries for CAPA
-	echo "

Log entries for CAPA:

" >> \
-	../../doc/build/cvsreport.html
-	cd ../../CAPA; cvs log -d ">`date --date='8 days ago' \
-	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
-	../doc/build/cvsreport.html
-	# Log entries for doc
-	echo "

Log entries for doc:

" >> \
-	../../doc/build/cvsreport.html
-	cd ../../doc; cvs log -d ">`date --date='8 days ago' \
-	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
-	../doc/build/cvsreport.html
-	# Log entries for packaging
-	echo "

Log entries for packaging:

" >> \
+	echo "

" >> ../../doc/build/cvsreport.html + make -f Makefile.cvs COMPONENT=loncom logentries + make -f Makefile.cvs COMPONENT=CAPA logentries + make -f Makefile.cvs COMPONENT=doc logentries + +logentries: + # Log entries for $(COMPONENT) + echo "

Log entries for $(COMPONENT):

" >>\
 	../../doc/build/cvsreport.html
-	cd ../../packaging; cvs log -d ">`date --date='8 days ago' \
+	cd ../../$(COMPONENT); cvs log -d ">`date --date='$(TIMEAGO) days ago' \
 	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
 	../doc/build/cvsreport.html
 	echo "

" >> ../../doc/build/cvsreport.html statpage: - install -d cvsstats + install -d $(STATSUBDIR) echo 'LON-CAPA Coding Metrics' > $(STATSUBDIR)/index.html echo '' >> $(STATSUBDIR)/index.html echo '

LON-CAPA Coding Metrics

' >> $(STATSUBDIR)/index.html