--- loncom/build/Makefile 2002/09/05 21:08:55 1.130.2.3 +++ loncom/build/Makefile 2003/06/13 22:13:09 1.148 @@ -1,7 +1,6 @@ # The LearningOnline Network with CAPA -# Scott Harrison, your friendly neighborhood volunteer -# $Id: Makefile,v 1.130.2.3 2002/09/05 21:08:55 albertel Exp $ +# $Id: Makefile,v 1.148 2003/06/13 22:13:09 albertel Exp $ # TYPICAL USAGE of this Makefile is primarily for two targets: # "make build" and "make install". @@ -23,8 +22,13 @@ SAVE=program.pl.$(TIMESTAMP) LAUNCHSAVE=$(OUTSTREAM) $(SAVE) METAMTARGET="" MTARGET="" -VERSION=0.5.1 +VERSION=0.99.2 +# The current working definition for "RELEASE" is: changes not in the software, +# but in the operating system dependent packaging of the software. Thus, the +# 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 @@ -184,6 +188,20 @@ help_TARGETS: @echo " interfere with rebuilding/recompiling software" @echo "reallyclean: remove all files that were generated during" @echo " building or compilation of the software" + @echo "uninstall: remove all directories that do not contain files" + @echo " from other software packages and that do not contain" + @echo " student and instructor data; NOTE THAT THIS IS" + @echo " INTERACTIVE--you will be given a final chance" + @echo " to look at what will and will not be deleted." + @echo " Still, be careful. This is a very new target and is" + @echo " an alpha-level software feature for now." + @echo "backup: rolls a tarball backup of all important student and " + @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\"" @@ -307,6 +325,7 @@ vanillatar: # ----------------------------- Point TEST to the internal make process echo '#!/bin/sh' > $(SOURCE)/TEST echo 'cd loncom/build; make test' >> $(SOURCE)/TEST + echo 'cd system_dependencies || cd loncom/build/system_dependencies; cp -v CPAN_STATUS_REPORT ../../../CPAN_STATUS_REPORT' >> $(SOURCE)/TEST # ----------------------------- Copy CHECKRPMS to the vanilla top-level cp -v $(SOURCE)/loncom/build/CHECKRPMS $(SOURCE)/CHECKRPMS # ----------------------- vanilla executables must indeed be executable @@ -314,7 +333,7 @@ vanillatar: chmod a+rx $(SOURCE)/TEST chmod a+rx $(SOURCE)/CHECKRPMS # -------------------------------- Copy README to the vanilla top-level - cp -v $(SOURCE)/doc/shortest_path_redhat7.2.txt $(SOURCE)/README + #cp -v $(SOURCE)/doc/shortest_path_redhat7.2.txt $(SOURCE)/README tardist: make MANIFEST_all @@ -353,10 +372,22 @@ reseval_fixup: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ tee -a WARNINGS +clearoutoldspreadsheetcache: + cat $(SOURCE)/doc/loncapafiles/clearoutoldspreadsheetcache.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + +sendmail_fix: + cat $(SOURCE)/doc/loncapafiles/sendmail_fix.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + postinstall: make webserverconf make reseval_fixup + make clearoutoldspreadsheetcache make sanitycheck + make sendmail_fix VERSION: install -d $(TARGET)/etc @@ -446,6 +477,8 @@ MANIFEST_all: echo 'loncom/rawhide_hosts.tab' >> $(SOURCE)/MANIFEST echo 'loncom/production_hosts.tab' >> $(SOURCE)/MANIFEST echo 'loncom/development_hosts.tab' >> $(SOURCE)/MANIFEST + echo 'loncom/production_domain.tab' >> $(SOURCE)/MANIFEST + echo 'loncom/development_domain.tab' >> $(SOURCE)/MANIFEST # ------------------ Files needed for dynamically generated directories echo 'doc/man' >> $(SOURCE)/MANIFEST echo 'doc/lib' >> $(SOURCE)/MANIFEST @@ -476,6 +509,9 @@ MANIFEST_lpml: cat $(SOURCE)/doc/loncapafiles/testfiles.lpml | \ perl lpml_parse.pl MANIFEST development default \ '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST + cat $(SOURCE)/doc/loncapafiles/installfiles.lpml | \ + perl lpml_parse.pl MANIFEST development default \ + '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \ perl lpml_parse.pl MANIFEST development default \ '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST @@ -544,8 +580,8 @@ RPM: BinaryRoot base_rpm_file_list cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \ perl lpml_parse.pl make_rpm $(CATEGORY) $(DIST) $(SOURCE) $(TARGET) \ > base_customizerpm.xml - cat base_rpm_file_list.txt | perl make_rpm.pl base 3.2 '' '' \ - BinaryRoot base_customizerpm.xml + cat base_rpm_file_list.txt | perl make_rpm.pl base $(VERSION) \ + $(RELEASE) '' '' BinaryRoot base_customizerpm.xml DPKG: make TARGET='lon-capa-$(VERSION)' NORESTORECONF='1' install @@ -708,6 +744,7 @@ clean: rm -f program.pl* rm -Rf lpmladm.* rm -f WARNINGS + rm -f CPAN_STATUS_REPORT rm -f $(SOURCE)/loncom/build/hosts.tab reallyclean: @@ -739,5 +776,38 @@ reallyclean: make -f Makefile.cvs clean rm -f WARNINGS +uninstall: + rm -f UNINSTALL_SHELL_COMMANDS + cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \ + perl lpml_parse.pl uninstall_shell_commands $(CATEGORY) $(DIST) \ + "$(SOURCE)" "$(TARGET)" > UNINSTALL_SHELL_COMMANDS + @echo -n "**** NOTE **** A file \"UNINSTALL_SHELL_COMMANDS\" has been " + @echo "generated." + @echo "First, you should view the contents of this file." + @echo "If you are happy with the 'rm -Rf'! commands (or at least" + @echo "have another job lined up in case of catastrophe), then you " + @echo "can execute the following: sh ./UNINSTALL_SHELL_COMMANDS" + +backup: + @echo "Not yet implemented" + +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: