--- loncom/build/Makefile 2007/05/24 07:01:15 1.183.2.3 +++ loncom/build/Makefile 2011/03/10 16:41:42 1.195 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA -# $Id: Makefile,v 1.183.2.3 2007/05/24 07:01:15 albertel Exp $ +# $Id: Makefile,v 1.195 2011/03/10 16:41:42 raeburn Exp $ # TYPICAL USAGE of this Makefile is primarily for two targets: # "make build" and "make install". @@ -22,7 +22,13 @@ SAVE=program.pl.$(TIMESTAMP) LAUNCHSAVE=$(OUTSTREAM) $(SAVE) METAMTARGET="" MTARGET="" -VERSION=2.3.99.1 +VERSION=CVS_HEAD +SHOWVERSION=$(VERSION) +NEXTVERSION=2.11 +ifeq (CVS_HEAD,${VERSION}) +SHOWVERSION=$(NEXTVERSION).$(VERSION) +endif +# # 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. @@ -128,10 +134,17 @@ help_TARGETS: @echo " configuration files for yum and MySQL." @echo "ntpcheck: test to see if ntp is installed and running." @echo "html_parser_check: test functionality of HTML::Parser." + @echo "math_random_check: test functionality of Math::Random." @echo "cron_lpmlcheck: remove cron file /etc/cron.d/loncapa.lpml." @echo "chkconfig: test runlevels of httpd and loncontrol." @echo "rpmcheck: test to see if rpms known to confict are installed." @echo "wrap_setuid: put a C wrapper around setuid scripts." + @echo "latex_fixup: regenerate ls-R database for the latex base." + @echo "picins_check: check for picins.sty, retrieve and rebuild" + @echo " filename databases used by LaTeX" + @echo "mimetex_version_check: check if mimetex.cgi version has changed," + @echo " if so remove files from mimetexcache." + @echo "latex_fmtutil: run utility to maintain TeX format files system-wide." @echo "updatequery: solicit the user for machine configuration" @echo " information; to be incorporated during an update" @echo " procedure (via the UPDATE command)" @@ -141,6 +154,8 @@ help_TARGETS: @echo " /home/httpd/html/lon-status/version.txt" @echo "aboutVERSION: place version information inside about.html" @echo " and loncapa_apache.conf" + @echo "postaboutVERSION: restore default version to" + @echo " about.html and loncapa_apache.conf" @echo "*** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml ***" @echo "Makefile.configinstall: generate a Makefile for configuration" @echo " files; built dynamically from" @@ -248,8 +263,8 @@ TEST_hosts_tab: else echo "**** ERROR **** hosts.tab not defined!" && \ echo -n "You need to do one of the following within your " && \ echo "CVS repository (cd loncapa/loncom)" && \ - echo " 1) ln -s production_hosts.tab hosts.tab" && \ - echo " 2) ln -s development_hosts.tab hosts.tab" && \ + echo " 1) ln -s production_dns_hosts.tab dns_hosts.tab" && \ + echo " 2) ln -s development_dns_hosts.tab dns_hosts.tab" && \ echo "or 3) ln -s rawhide_hosts.tab hosts.tab" && \ echo "(you most likely want option #1, production_hosts.tab)" && \ exit 1; \ @@ -262,8 +277,8 @@ TEST_domain_tab: else echo "**** ERROR **** domain.tab not defined!" && \ echo -n "You need to do one of the following within your " && \ echo "CVS repository (cd loncapa/loncom)" && \ - echo " 1) ln -s production_domain.tab domain.tab" && \ - echo " 2) ln -s development_domain.tab domain.tab" && \ + echo " 1) ln -s production_dns_domain.tab dns_domain.tab" && \ + echo " 2) ln -s development_dns_domain.tab dns_domain.tab" && \ echo "or 3) ln -s rawhide_domain.tab domain.tab" && \ echo "(you most likely want option #1, production_domain.tab)" && \ exit 1; \ @@ -302,6 +317,7 @@ configinstall: Makefile.configinstall install: buildflag VERSION TEST_hosts_tab TEST_domain_tab Makefile.install Makefile echo -n "" > WARNINGS + make aboutVERSION make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \ directories make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files @@ -310,7 +326,7 @@ install: buildflag VERSION TEST_hosts_ta NORESTORECONF="$(NORESTORECONF)" configinstall make postinstall make warningnote - @echo "You can now run 'make test' to see if your system is ready to go!" +# @echo "You can now run 'make test' to see if your system is ready to go!" # @echo "NOTE THAT YOUR SYSTEM MUST HAVE MYSQL WITH A USER=\"www\" AND" # @echo -n "PASSWORD=\"localhostkey\" FOR www\@localhost" # @echo -n "(YOU MAY NEED TO REINITIALIZE YOUR MYSQL www\@localhost USER)" @@ -368,18 +384,11 @@ tardist: else \ ln -s . $(DIRTARGET); \ fi - cp -v $(SOURCE)/loncom/license/about.html \ - $(SOURCE)/loncom/license/about.html.orig - cp -v $(SOURCE)/loncom/loncapa_apache.conf \ - $(SOURCE)/loncom/loncapa_apache.conf.orig make aboutVERSION cd $(SOURCE); \ tar --no-recursion --numeric-owner --files-from MANIFEST \ -h -czf $(DIRTARGET).tar.gz 2>tar_WARNINGS || [ "0" == "0" ] - mv -v $(SOURCE)/loncom/license/about.html.orig \ - $(SOURCE)/loncom/license/about.html - mv -v $(SOURCE)/loncom/loncapa_apache.conf.orig \ - $(SOURCE)/loncom/loncapa_apache.conf + make postaboutVERSION cat $(SOURCE)/tar_WARNINGS | \ xargs --replace=XXX echo '**** WARNING **** XXX' > WARNINGS rm -f $(SOURCE)/tar_WARNINGS @@ -395,6 +404,11 @@ html_parser_check: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ tee -a WARNINGS +math_random_check: + cat $(SOURCE)/doc/loncapafiles/math_random_check.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + cron_lpmlcheck: cat $(SOURCE)/doc/loncapafiles/cron_lpmlcheck.piml | \ perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ @@ -473,7 +487,33 @@ wrap_setuid: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ tee -a WARNINGS +latex_fixup: + cat $(SOURCE)/doc/loncapafiles/latex_fixup.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + +picins_check: + cat $(SOURCE)/doc/loncapafiles/picins_check.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + +mimetex_version_check: + cat $(SOURCE)/doc/loncapafiles/mimetex_version_check.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + +verify_domconfiguser: + cat $(SOURCE)/doc/loncapafiles/verify_domconfiguser.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + +latex_fmtutil: + cat $(SOURCE)/doc/loncapafiles/latex_fmtutil.piml | \ + perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \ + tee -a WARNINGS + postinstall: + make postaboutVERSION make webserverconf make reseval_fixup make clean_file_permissions @@ -491,7 +531,11 @@ postinstall: make sendmail_fix make ownership_fix make wrap_setuid - + make latex_fixup + make picins_check + make mimetex_version_check + make verify_domconfiguser + make latex_fmtutil VERSION: install -d $(TARGET)/etc echo -n "LON-CAPA release $(VERSION)-" > $(TARGET)/etc/loncapa-release @@ -501,17 +545,43 @@ VERSION: date +"%Y%m%d" >> $(TARGET)/home/httpd/html/lon-status/version.txt aboutVERSION: + cp -v $(SOURCE)/loncom/license/about.html \ + $(SOURCE)/loncom/license/about.html.orig + cp -v $(SOURCE)/loncom/loncapa_apache.conf \ + $(SOURCE)/loncom/loncapa_apache.conf.orig cat $(SOURCE)/loncom/license/about.html | \ - perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \ + perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/(\<\!\-\- VERSION \-\-\>|\d+\.\d+\.CVS_HEAD\-\d{10})/$(SHOWVERSION)-$$d/; print;}' > \ $(SOURCE)/loncom/license/about.html.new mv -v $(SOURCE)/loncom/license/about.html.new \ $(SOURCE)/loncom/license/about.html cat $(SOURCE)/loncom/loncapa_apache.conf | \ - perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \ + perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/(\<\!\-\- VERSION \-\-\>|\d+\.\d+\.CVS_HEAD\-\d{10})/$(SHOWVERSION)-$$d/; print;}' > \ $(SOURCE)/loncom/loncapa_apache.conf.new mv -v $(SOURCE)/loncom/loncapa_apache.conf.new \ $(SOURCE)/loncom/loncapa_apache.conf +postaboutVERSION: + if (test -e $(SOURCE)/loncom/license/about.html.orig) && \ + (diff $(SOURCE)/loncom/license/about.html \ + $(SOURCE)/loncom/license/about.html > /dev/null); then \ + mv -v $(SOURCE)/loncom/license/about.html.orig \ + $(SOURCE)/loncom/license/about.html; \ + elif (test -e $(SOURCE)/loncom/license/about.html.orig) && \ + !(diff $(SOURCE)/loncom/license/about.html \ + $(SOURCE)/loncom/license/about.html > /dev/null); then \ + rm -f $(SOURCE)/loncom/license/about.html.orig; \ + fi + if (test -e $(SOURCE)/loncom/loncapa_apache.conf.orig) && \ + (diff $(SOURCE)/loncom/license/about.html \ + $(SOURCE)/loncom/license/about.html > /dev/null); then \ + mv -v $(SOURCE)/loncom/loncapa_apache.conf.orig \ + $(SOURCE)/loncom/loncapa_apache.conf; \ + elif (test -e $(SOURCE)/loncom/loncapa_apache.conf.orig) && \ + !(diff $(SOURCE)/loncom/license/about.html \ + $(SOURCE)/loncom/license/about.html > /dev/null); then \ + rm -f $(SOURCE)/loncom/loncapa_apache.conf.orig; \ + fi + # ========= *** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml *** Makefile.configinstall: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml \