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

harris41 lon-capa-cvs@mail.lon-capa.org
Fri, 24 Jan 2003 01:21:30 -0000


harris41		Thu Jan 23 20:21:30 2003 EDT

  Modified files:              
    /loncom/build	Makefile 
  Log:
  BUG 1192 FIXED; linking, noting, or warning depending on status
  of localauth.pm (target is 'localauth' inside this Makefile)
  
  
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.142 loncom/build/Makefile:1.143
--- loncom/build/Makefile:1.142	Mon Jan 20 12:39:00 2003
+++ loncom/build/Makefile	Thu Jan 23 20:21:30 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 
 # Scott Harrison, your friendly neighborhood volunteer
-# $Id: Makefile,v 1.142 2003/01/20 17:39:00 harris41 Exp $
+# $Id: Makefile,v 1.143 2003/01/24 01:21:30 harris41 Exp $
 
 # TYPICAL USAGE of this Makefile is primarily for two targets:
 # "make build" and "make install".
@@ -29,6 +29,7 @@
 # generic tarball releases do not need to have a release number specified.
 RELEASE=1 # As a general rule for now, this is always being set to "1".
 DIRTARGET=loncapa-$(VERSION)
+LOCALAUTHPATH=/home/httpd/lib/perl
 
 # =============================================== Help targets for the Makefile
 # If 'make' is run without any arguments, the 'help' target is called since
@@ -199,6 +200,9 @@
 	@echo "        instructor data (NOT YET IMPLEMENTED)"
 	@echo "restore: reseeds a LON-CAPA server with tarball backups "
 	@echo "         generated by \"make backup\" (NOT YET IMPLEMENTED)"
+	@echo "*** AUXILIARY TESTS ***"
+	@echo "localauth: tests to see if localauth exists or not and run"
+	@echo "           appropriate tests"
 	@echo "*** A HELPFUL DEPENDENCY ***"
 	@echo "alwaysrun: blank target that is a dependency for targets"
 	@echo "           that should \"always run\""
@@ -788,6 +792,21 @@
 
 restore:
 	@echo "Not yet implemented"
+
+# ===================================================== *** AUXILIARY TESTS ***
+localauth:
+	@if (test -e $(LOCALAUTHPATH)/localauth.pm) && \
+             !(diff $(LOCALAUTHPATH)/localauth-std.pm \
+              $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
+		echo "**** WARNING **** $(LOCALAUTHPATH)/localauth.pm is different than the $(LOCALAUTHPATH)/localauth-std.pm; if you have not customized localauth.pm, then please manually overwrite localauth.pm (rm $(LOCALAUTHPATH)/localauth.pm; ln -s $(LOCALAUTHPATH)/localauth-std.pm $(LOCALAUTHPATH)/localauth.pm); if you have customized localauth.pm, then please double-check to see that your customized localauth.pm is compatible with any localauth-std.pm changes for this version of LON-CAPA"| tee -a WARNINGS; \
+	elif (test -e $(LOCALAUTHPATH)/localauth.pm) && \
+              (diff $(LOCALAUTHPATH)/localauth-std.pm \
+              $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
+		echo "**** NOTE **** LOCAL AUTH IS IDENTICAL WITH STANDARD TEMPLATE"| tee -a WARNINGS; \
+	elif !(test -e $(LOCALAUTHPATH)/localauth.pm) && \
+	      (test -e $(LOCALAUTHPATH)/localauth-std.pm); then \
+		ln -s $(LOCALAUTHPATH)/localauth-std.pm $(LOCALAUTHPATH)/localauth.pm; \
+	fi
 
 # ================================================ *** A HELPFUL DEPENDENCY ***
 alwaysrun: