[LON-CAPA-cvs] cvs: loncom /build Makefile

harris41 lon-capa-cvs@mail.lon-capa.org
Tue, 18 Jun 2002 06:43:09 -0000


harris41		Tue Jun 18 02:43:09 2002 EDT

  Modified files:              
    /loncom/build	Makefile 
  Log:
  BUG 554 FIX.  Versioning the about.html page.
  
  
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.122 loncom/build/Makefile:1.123
--- loncom/build/Makefile:1.122	Mon Jun 17 01:51:00 2002
+++ loncom/build/Makefile	Tue Jun 18 02:43:09 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 
 # Scott Harrison
-# $Id: Makefile,v 1.122 2002/06/17 05:51:00 harris41 Exp $
+# $Id: Makefile,v 1.123 2002/06/18 06:43:09 harris41 Exp $
 
 DISTPROBE=`perl ./distprobe`
 DIST=$(DISTPROBE)
@@ -220,7 +220,14 @@
 VERSION:
 	install -d $(TARGET)/etc
 	echo -n "LON-CAPA release $(VERSION)-" > $(TARGET)/etc/loncapa-release
-	`date +"%Y%m%d"` >> $(TARGET)/etc/loncapa-release
+	date +"%Y%m%d" >> $(TARGET)/etc/loncapa-release
+
+aboutVERSION:
+	cat $(SOURCE)/loncom/license/about.html | \
+	perl -e '$$d=`date +"%Y%m%d"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \
+	$(SOURCE)/loncom/license/about.html.new
+	mv -v $(SOURCE)/loncom/license/about.html.new \
+	$(SOURCE)/loncom/license/about.html
 
 install: VERSION TEST_hosts_tab Makefile.install Makefile
 	echo -n "" > WARNINGS
@@ -466,6 +473,7 @@
 	echo 'make updatequery' >> $(SOURCE)/UPDATE
 	echo 'make hosts_tab' >> $(SOURCE)/UPDATE
 	echo 'make postinstall' >> $(SOURCE)/UPDATE
+	echo 'make aboutVERSION' >> $(SOURCE)/UPDATE
 	echo 'make warningnote' >> $(SOURCE)/UPDATE
 	# ----------------------------- Point TEST to the internal make process
 	echo '#!/bin/sh' > $(SOURCE)/TEST
@@ -493,9 +501,14 @@
 	else \
 		ln -s . $(DIRTARGET); \
 	fi
+	cp -v $(SOURCE)/loncom/license/about.html \
+	$(SOURCE)/loncom/license/about.html.orig
+	make aboutVERSION
 	cd $(SOURCE); \
 	tar --no-recursion --numeric-owner --files-from MANIFEST_loncapa \
 	-h -czf loncapa.tar.gz 2>WARNINGS || [ "0" == "0" ]
+	mv -v $(SOURCE)/loncom/license/about.html.orig \
+	$(SOURCE)/loncom/license/about.html
 	cat $(SOURCE)/WARNINGS | \
 	xargs --replace=XXX echo '**** WARNING **** XXX' > WARNINGS
 	rm -f $(SOURCE)/WARNINGS