Annotation of loncom/build/Makefile, revision 1.150.2.1

1.48      harris41    1: # The LearningOnline Network with CAPA
                      2: 
1.150.2.1! albertel    3: # $Id: Makefile,v 1.150 2003/06/27 14:02:57 albertel Exp $
1.1       harris41    4: 
1.129     harris41    5: # TYPICAL USAGE of this Makefile is primarily for two targets:
                      6: # "make build" and "make install".
                      7: # Many other targets and features are supported (see the initial
                      8: # help targets).
                      9: 
                     10: # ======================================= Default settings for Makefile options
1.79      harris41   11: DISTPROBE=`perl ./distprobe`
                     12: DIST=$(DISTPROBE)
1.39      harris41   13: CATEGORY="development"
1.80      harris41   14: SOURCE=../..
1.51      harris41   15: TARGET=""
1.55      harris41   16: NORESTORECONF="0"
1.66      harris41   17: HOSTNAME=""
                     18: LAUNCH=| perl
1.106     harris41   19: QUERYLAUNCH=> /tmp/loncapa_query.pl; perl /tmp/loncapa_query.pl
1.66      harris41   20: OUTSTREAM=>
                     21: SAVE=program.pl.$(TIMESTAMP)
                     22: LAUNCHSAVE=$(OUTSTREAM) $(SAVE)
                     23: METAMTARGET=""
                     24: MTARGET=""
1.150.2.1! albertel   25: VERSION=0.99.4
1.142     harris41   26: # The current working definition for "RELEASE" is: changes not in the software,
                     27: # but in the operating system dependent packaging of the software.  Thus, the
                     28: # generic tarball releases do not need to have a release number specified.
                     29: RELEASE=1 # As a general rule for now, this is always being set to "1".
1.126     harris41   30: DIRTARGET=loncapa-$(VERSION)
1.143     harris41   31: LOCALAUTHPATH=/home/httpd/lib/perl
1.12      harris41   32: 
1.129     harris41   33: # =============================================== Help targets for the Makefile
                     34: # If 'make' is run without any arguments, the 'help' target is called since
                     35: # it is the first target.
1.105     harris41   36: help:
1.52      harris41   37: 	@echo "*** You need to specify a valid target ***"
1.129     harris41   38: 	@echo "To get a list of valid targets: \"make help_TARGETS\""
                     39: 	@echo "To get a list of valid options: \"make help_OPTIONS\""
                     40: 	@echo " "
                     41: 	@echo "Typically invoked targets are:"
                     42: 	@echo "    make build"
                     43: 	@echo "    make install"
                     44: 	@echo "    make test"
                     45: 	@echo "    make clean"
                     46: 
                     47: help_OPTIONS:
                     48: 	@echo "* ADJUSTABLE OPTIONS *"
1.105     harris41   49: 	@echo "(option) DIST can be redhat7, debian, redhat6.2, or default"
1.129     harris41   50: 	@echo "         You probably do not need to specify this; it is"
                     51: 	@echo "         automatically probed for."
                     52: 	@echo "(option) CATEGORY can be 'runtime' or 'development'; currently"
                     53: 	@echo "         the 'development' setting is the most reliable;"
                     54: 	@echo "         eventually, production machines should be using the"
                     55: 	@echo "         'runtime' settings"
                     56: 	@echo "(option) SOURCE is an absolute or relative directory path."
                     57: 	@echo "         SOURCE corresponds to the root directory of the"
                     58: 	@echo "         loncapa source release"
                     59: 	@echo "(option) TARGET is an absolute or relative directory path."
                     60: 	@echo "         This is where files will be installed on your system."
                     61: 	@echo "         Typically, this should be set to nothing (which"
                     62: 	@echo "         corresponds to the '/' root of the entire filesystem)."
                     63: 	@echo "(option) NORESTORECONF, when set to a non-zero value, stops"
                     64: 	@echo "         filesystem upgrades from overwriting existing "
                     65: 	@echo "         configuration files.  Ordinarily, NORESTORECONF=0, "
                     66: 	@echo "         because the existing configuration files are safely"
                     67: 	@echo "         dealt with (or so one hopes... :) )."
                     68: 	@echo "(option) HOSTNAME specifies the name of a remote server for"
                     69: 	@echo "         which a NET_* Makefile target should be launched"
                     70: 	@echo "(option) VERSION; especially useful for the 'tardist' target"
                     71: 	@echo "         this tags the tarball file and internal directories"
                     72: 	@echo "         with a specific version string (conventionally "
                     73: 	@echo "         numeric)"
                     74: 
                     75: help_TARGETS:
                     76: 	@echo "*** RUNNING TESTS TO ENSURE SOLID PERFORMANCE ***"
                     77: 	@echo "test: test different parts of the LON-CAPA system (TEST_*)."
                     78: 	@echo "      Makefile-dependent processes as well as horizontal and"
                     79: 	@echo "      vertical aspects of the LON-CAPA system architecture"
                     80: 	@echo "      are all tested."
                     81: 	@echo "TEST_lpml_scripts: make sure that the system can process"
                     82: 	@echo "                   the Linux Packaging Markup Language."
                     83: 	@echo "                   This is neither horizontal or vertical"
                     84: 	@echo "                   testing.  The idea is to make sure that"
                     85: 	@echo "                   the installation software itself works"
                     86: 	@echo "                   as expected."
1.52      harris41   87: 	@echo "TEST_system_dependencies: make sure that all needed system "
                     88: 	@echo "                          components are active and present "
                     89: 	@echo "                          on the server such as perl modules"
                     90: 	@echo "                          and the MySQL database"
1.129     harris41   91: 	@echo "                          (horizontal testing)"
                     92: 	@echo "TEST_web_layer: mimic a login and various vertical actions on "
1.52      harris41   93: 	@echo "                a LON-CAPA system"
1.149     albertel   94: 	@echo "TEST_hosts_and_domain_tab: make sure that a "
                     95: 	@echo "        loncapa/loncom/hosts.tab and loncapa/loncom/domain.tab"
                     96: 	@echo "        file is specified for installation"
1.129     harris41   97: 	@echo "TEST_html2ps: test for the presence of html2ps which is needed"
                     98: 	@echo "              for making a PDF compilation for pdfdoc"
                     99: 	@echo "*** GENERAL TARGETS SUCH AS 'build' AND 'install' ***"
                    100: 	@echo "build: compile the source tree"
                    101: 	@echo "buildflag: a semaphore that helps educate the user to run"
                    102: 	@echo "           'make build' first before running 'make install'"
                    103: 	@echo "configinstall: install configuration files and restore with"
                    104: 	@echo "               prior information"
1.134     albertel  105: 	@echo "install: install from a ***compiled*** source tree"
1.129     harris41  106: 	@echo "         (see make build) to a specified TARGET destination"
                    107: 	@echo "         on the filesystem (default setting is TARGET=/)."
                    108: 	@echo "rawinstall: just install files, links and directories without"
                    109: 	@echo "            any bells or whistles (e.g. double-checking"
                    110: 	@echo "            configurations, fine-tuning webserver, etc.)"
1.149     albertel  111: 	@echo "hosts_and_domain_tab: install the hosts.tab and domain.tab" 
                    112: 	@echo "                      to the filesystem"
1.129     harris41  113: 	@echo "webserverconf: fine-tune the web server configuration;"
                    114: 	@echo "               make sure the proper 'Include' statements"
                    115: 	@echo "               are appended to httpd.conf"
                    116: 	@echo "vanillatar: generate top-level files such as README, UPDATE,"
                    117: 	@echo "            CHECKRPMS, and TEST (needed by tardist)"
                    118: 	@echo "tardist: build a tarball that will upgrade the software on a "
                    119: 	@echo "         system"
                    120: 	@echo "sanitycheck: probe for common errors and recommend fixes to"
                    121: 	@echo "             the user"
                    122: 	@echo "updatequery: solicit the user for machine configuration"
                    123: 	@echo "             information; to be incorporated during an update"
                    124: 	@echo "             procedure (via the UPDATE command)"
                    125: 	@echo "postinstall: double-check things after installation"
                    126: 	@echo "VERSION: tag the filesystem with version information inside"
                    127: 	@echo "         /etc/loncapa-release"
                    128: 	@echo "aboutVERSION: place version information inside about.html"
                    129: 	@echo "*** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml ***"
                    130: 	@echo "Makefile.configinstall: generate a Makefile for configuration"
                    131: 	@echo "                        files; built dynamically from"
                    132: 	@echo "                        loncapafiles.lpml"
                    133: 	@echo "Makefile.build: generate a Makefile for compiling"
                    134: 	@echo "                files inside the source directory; "
                    135: 	@echo "                Makefile.build is generated from"
                    136: 	@echo "                loncapafiles.lpml"
                    137: 	@echo "Makefile.install: generate a Makefile for installing"
                    138: 	@echo "                  files; built dynamically from"
                    139: 	@echo "                  loncapafiles.lpml"
                    140: 	@echo "*** TARGETS FOR OPERATING ON FILESYSTEMS ACROSS THE NETWORK ***"
                    141: 	@echo "lpmladm: coordinates username=lpmladm mediated secure shell"
                    142: 	@echo "         processes; needed for the NET_* targets"
1.149     albertel  143: 	@echo "NET_hosts_and_domain_tab: install the hosts.tab and domain.tab"
                    144: 	@echo "                          to a filesystem elsewhere"
                    145: 	@echo "                          on the network"
1.129     harris41  146: 	@echo "NET_webserverconf: fine-tune the web server configuration on a"
                    147: 	@echo "                   filesystem elsewhere on the network"
                    148: 	@echo "NET_rawinstall: launch the rawinstall target on a filesystem"
                    149: 	@echo "                elsewhere on the network"
                    150: 	@echo "*** TARGETS FOR MAKING LISTS (MANIFESTS) OF LON-CAPA FILES ***"
                    151: 	@echo "MANIFEST_all: generate a list of all files to be included in"
                    152: 	@echo "              the distributed tarball"
                    153: 	@echo "MANIFEST_cvs: essentially a list of all CVS/Entries files used"
                    154: 	@echo "              for 'time-checking' intelligence"
1.134     albertel  155: 	@echo "MANIFEST_lpml: a list of all LON-CAPA files to be installed,"
1.129     harris41  156: 	@echo "               compile from, used as building software, and"
                    157: 	@echo "               testing"
                    158: 	@echo "MANIFEST_vanillatar: 'README'-type top-level files that a user"
                    159: 	@echo "                     of the distributed tarball would first"
                    160: 	@echo "                     look at and work with"
                    161: 	@echo "*** STATUS REPORT TARGETS ***"
                    162: 	@echo "warningnote: analyze the WARNINGS file and produce a synopsis"
                    163: 	@echo "             and recommended action to the user"
1.52      harris41  164: 	@echo "HTML: generate an HTML-formatted description of the LON-CAPA"
1.129     harris41  165: 	@echo "      source files"
                    166: 	@echo "status: compare the TARGET filesystem with a compiled loncapa "
1.52      harris41  167: 	@echo "        source directory"
                    168: 	@echo "statuspost: post the results of "make status" to "
                    169: 	@echo "            TARGET/home/httpd/html/lon-status/filestatus.html"
                    170: 	@echo "rpmstatus: compare the rpms on a system to defined lists "
1.129     harris41  171: 	@echo "           loncapa/doc/otherfiles/cd_rpms and "
                    172: 	@echo "           loncapa/doc/otherfiles/rpm_list.txt"
                    173: 	@echo "rpmstatuspost: post the results of 'make rpmstatus' to "
1.52      harris41  174: 	@echo "            TARGET/home/httpd/html/lon-status/rpmstatus.html"
1.129     harris41  175: 	@echo "*** ALTERNATIVE PACKAGING TARGETS ***"
                    176: 	@echo "RPM: build LON-CAPA-base RPM from loncapa source repository"
                    177: 	@echo "     (still under development)"
                    178: 	@echo "DPKG: build a loncapa Debian package from loncapa source"
                    179: 	@echo "      repository (still under development)"
                    180: 	@echo "base_rpm_file_list: create a file listing to be used for"
                    181: 	@echo "                    generating an RPM software package"
                    182: 	@echo "BinaryRoot: create a BinaryRoot directory to be used for"
                    183: 	@echo "            generating an RPM software package"
                    184: 	@echo "*** MASTER DOCUMENTATION TARGETS ***"	
                    185: 	@echo "doc: generate web-page documentation for install.lon-capa.org"
                    186: 	@echo "     (and eventually for documentation on installed machines)"
                    187: 	@echo "pdfdoc: make a PDF-formatted compilation of all installation"
                    188: 	@echo "        documentation"
                    189: 	@echo "*** KEEPING THINGS CLEAN ***"
                    190: 	@echo "clean: remove any files that might (even by remote chance)"
                    191: 	@echo "       interfere with rebuilding/recompiling software"
                    192: 	@echo "reallyclean: remove all files that were generated during"
                    193: 	@echo "             building or compilation of the software"
1.136     harris41  194: 	@echo "uninstall: remove all directories that do not contain files"
                    195: 	@echo "           from other software packages and that do not contain"
                    196: 	@echo "           student and instructor data; NOTE THAT THIS IS"
                    197: 	@echo "           INTERACTIVE--you will be given a final chance"
                    198: 	@echo "           to look at what will and will not be deleted."
                    199: 	@echo "           Still, be careful.  This is a very new target and is"
                    200: 	@echo "           an alpha-level software feature for now."
                    201: 	@echo "backup: rolls a tarball backup of all important student and "
                    202: 	@echo "        instructor data (NOT YET IMPLEMENTED)"
                    203: 	@echo "restore: reseeds a LON-CAPA server with tarball backups "
                    204: 	@echo "         generated by \"make backup\" (NOT YET IMPLEMENTED)"
1.143     harris41  205: 	@echo "*** AUXILIARY TESTS ***"
                    206: 	@echo "localauth: tests to see if localauth exists or not and run"
                    207: 	@echo "           appropriate tests"
1.129     harris41  208: 	@echo "*** A HELPFUL DEPENDENCY ***"
                    209: 	@echo "alwaysrun: blank target that is a dependency for targets"
                    210: 	@echo "           that should \"always run\""
                    211: 
                    212: # =========================== *** RUNNING TESTS TO ENSURE SOLID PERFORMANCE ***
1.1       harris41  213: 
1.52      harris41  214: test: TEST_lpml_scripts TEST_system_dependencies TEST_web_layer
1.41      harris41  215: 	@echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
                    216: 
                    217: TEST_system_dependencies:
1.52      harris41  218: 	@echo "TESTING SYSTEM DEPENDENCIES"
1.41      harris41  219: 	cd system_dependencies; make
1.44      harris41  220: 
                    221: TEST_lpml_scripts:
1.52      harris41  222: 	@echo "TESTING LPML INSTALLATION CODE"
1.44      harris41  223: 	cd ../test; perl filecomparetest.pl
1.41      harris41  224: 
1.52      harris41  225: TEST_web_layer:
1.77      harris41  226: 	@echo "TESTING WEB LAYER"
                    227: 	cd weblayer_test; make
1.2       harris41  228: 
1.63      harris41  229: TEST_hosts_tab:
                    230: 	@echo "Testing hosts.tab"
1.120     albertel  231: 	@if (test -e ../hosts.tab); then \
1.129     harris41  232: 		echo "there is a defined link or file; assume okay"; \
1.63      harris41  233: 	else echo "**** ERROR **** hosts.tab not defined!" && \
                    234: 	     echo -n "You need to do one of the following within your " && \
1.92      harris41  235: 	     echo "CVS repository (cd loncapa/loncom)" && \
                    236: 	     echo "   1) ln -s production_hosts.tab hosts.tab" && \
                    237: 	     echo "   2) ln -s development_hosts.tab hosts.tab" && \
                    238: 	     echo "or 3) ln -s rawhide_hosts.tab hosts.tab" && \
1.63      harris41  239: 	     echo "(you most likely want option #1, production_hosts.tab)" && \
                    240: 	     exit 1; \
                    241: 	fi
1.64      harris41  242: 
1.149     albertel  243: TEST_domain_tab:
                    244: 	@echo "Testing domain.tab"
                    245: 	@if (test -e ../domain.tab); then \
                    246: 		echo "there is a defined link or file; assume okay"; \
                    247: 	else echo "**** ERROR **** domain.tab not defined!" && \
                    248: 	     echo -n "You need to do one of the following within your " && \
                    249: 	     echo "CVS repository (cd loncapa/loncom)" && \
                    250: 	     echo "   1) ln -s production_domain.tab domain.tab" && \
                    251: 	     echo "   2) ln -s development_domain.tab domain.tab" && \
                    252: 	     echo "or 3) ln -s rawhide_domain.tab domain.tab" && \
                    253: 	     echo "(you most likely want option #1, production_domain.tab)" && \
                    254: 	     exit 1; \
                    255: 	fi
                    256: 
1.129     harris41  257: TEST_html2ps:
                    258: 	@if (test -e /usr/local/html2ps/bin/html2ps); then \
                    259: 		echo "I can find html2ps; assume okay"; \
                    260: 	else \
                    261: 	echo "**** ERROR **** cannot find /usr/local/html2ps/bin/html2ps!" && \
                    262:         echo "Please visit http://www.tdb.uu.se/~jan/html2ps.html" && \
                    263: 	exit 1; \
                    264: 	fi
                    265: 
                    266: # ======================= *** GENERAL TARGETS SUCH AS 'build' AND 'install' ***
                    267: 
                    268: build: Makefile.build pod2html.sh pod2man.sh
                    269: 	install -d $(SOURCE)/doc/man
                    270: 	install -d $(SOURCE)/doc/scripts
                    271: 	install -d $(SOURCE)/doc/lib/perl/Apache
                    272: 	echo -n "" > WARNINGS
                    273: 	make -f Makefile.build all
                    274: 	echo '1' > buildflag
                    275: 	make warningnote
                    276: 
                    277: buildflag:
                    278: 	@echo "**** ERROR **** You need to run 'make build' first" > WARNINGS
                    279: 	make warningnote
                    280: 	@need_to_run_make_build_first 2>/dev/null
                    281: 
                    282: configinstall: Makefile.configinstall
                    283: 	make -f Makefile.configinstall SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
                    284: 	configfiles
                    285: 	if (test "0" = $(NORESTORECONF)); then \
                    286: 	perl loncaparestoreconfigurations suffix .lpmlnew; fi
                    287: 
1.149     albertel  288: install: buildflag VERSION TEST_hosts_tab TEST_domain_tab Makefile.install Makefile
1.129     harris41  289: 	echo -n "" > WARNINGS
                    290: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
                    291: 	directories
                    292: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
                    293: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
                    294: 	make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
                    295: 	NORESTORECONF="$(NORESTORECONF)" configinstall
                    296: 	make postinstall
                    297: 	make warningnote
                    298: 	echo "You can run 'make test' to see if your system is ready to go!"
                    299: 	echo "NOTE THAT YOUR SYSTEM MUST HAVE MYSQL WITH A USER=\"www\" AND"
                    300: 	echo -n "PASSWORD=\"localhostkey\" FOR www\@localhost"
                    301: 	echo -n "(YOU MAY NEED TO REINITIALIZE YOUR MYSQL www\@localhost USER)"
                    302: 	echo -n "Please see http://install.lon-capa.org/ for more information"
                    303: 
                    304: rawinstall: VERSION Makefile.install Makefile
                    305: 	echo -n "" > WARNINGS
                    306: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
                    307: 	directories
                    308: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
                    309: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
                    310: 	make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
                    311: 	NORESTORECONF="$(NORESTORECONF)" configinstall
1.66      harris41  312: 
1.149     albertel  313: hosts_and_domain_tab: TEST_hosts_tab TEST_domain_tab
1.80      harris41  314: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    315: 	perl xfml_parse.pl $(SOURCE)/doc/loncapafiles/valid_hosts.xfml | \
1.64      harris41  316: 	perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
                    317: 	"$(TARGET)" > Makefile.install
1.66      harris41  318: 	make -f Makefile.install directories
1.64      harris41  319: 	make -f Makefile.install files
1.149     albertel  320: 	@echo "If hosts.tab or domain.tab has changed, restart httpd and loncontrol:"
1.64      harris41  321: 	@echo "   /etc/rc.d/init.d/httpd restart"
                    322: 	@echo "   /etc/rc.d/init.d/loncontrol restart"
                    323: 
1.129     harris41  324: webserverconf:
                    325: 	cat $(SOURCE)/doc/loncapafiles/webserver.piml | \
                    326: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH)
                    327: 
                    328: # ---------------- Top-level files such as README, UPDATE, CHECKRPMS, and TEST
                    329: vanillatar:
                    330: 	# --------------------------- Point UPDATE to the internal make process
                    331: 	echo '#!/bin/sh' > $(SOURCE)/UPDATE
                    332: 	echo 'touch loncom/build/WARNINGS' >> $(SOURCE)/UPDATE;
                    333: 	echo 'ln -s loncom/build/WARNINGS WARNINGS' >> $(SOURCE)/UPDATE;
                    334: 	echo 'cd loncom/build; make build' >> $(SOURCE)/UPDATE
                    335: 	echo 'make rawinstall' >> $(SOURCE)/UPDATE
                    336: 	echo 'make configinstall' >> $(SOURCE)/UPDATE
                    337: 	echo 'make updatequery' >> $(SOURCE)/UPDATE
1.149     albertel  338: 	echo 'make hosts_and_domain_tab' >> $(SOURCE)/UPDATE
1.129     harris41  339: 	echo 'make postinstall' >> $(SOURCE)/UPDATE
                    340: 	echo 'make aboutVERSION' >> $(SOURCE)/UPDATE
                    341: 	echo 'make warningnote' >> $(SOURCE)/UPDATE
                    342: 	# ----------------------------- Point TEST to the internal make process
                    343: 	echo '#!/bin/sh' > $(SOURCE)/TEST
                    344: 	echo 'cd loncom/build; make test' >> $(SOURCE)/TEST
1.132     harris41  345: 	echo 'cd system_dependencies || cd loncom/build/system_dependencies; cp -v CPAN_STATUS_REPORT ../../../CPAN_STATUS_REPORT' >> $(SOURCE)/TEST
1.129     harris41  346: 	# ----------------------------- Copy CHECKRPMS to the vanilla top-level
                    347: 	cp -v $(SOURCE)/loncom/build/CHECKRPMS $(SOURCE)/CHECKRPMS
                    348: 	# ----------------------- vanilla executables must indeed be executable
                    349: 	chmod a+rx $(SOURCE)/UPDATE
                    350: 	chmod a+rx $(SOURCE)/TEST
                    351: 	chmod a+rx $(SOURCE)/CHECKRPMS
                    352: 	# -------------------------------- Copy README to the vanilla top-level
1.146     albertel  353: 	#cp -v $(SOURCE)/doc/shortest_path_redhat7.2.txt $(SOURCE)/README
1.129     harris41  354: 
                    355: tardist:
                    356: 	make MANIFEST_all
                    357: 	make vanillatar
                    358: 	# -------------------------------------------------------- Make tardist
                    359: 	@cd $(SOURCE); \
                    360: 	if (test -h $(DIRTARGET)); then \
                    361: 		echo "$(DIRTARGET) link already defined; assume okay"; \
                    362: 	else \
                    363: 		ln -s . $(DIRTARGET); \
                    364: 	fi
                    365: 	cp -v $(SOURCE)/loncom/license/about.html \
                    366: 	$(SOURCE)/loncom/license/about.html.orig
                    367: 	make aboutVERSION
                    368: 	cd $(SOURCE); \
                    369: 	tar --no-recursion --numeric-owner --files-from MANIFEST \
                    370: 	-h -czf $(DIRTARGET).tar.gz 2>tar_WARNINGS || [ "0" == "0" ]
                    371: 	mv -v $(SOURCE)/loncom/license/about.html.orig \
                    372: 	$(SOURCE)/loncom/license/about.html
                    373: 	cat $(SOURCE)/tar_WARNINGS | \
                    374: 	xargs --replace=XXX echo '**** WARNING **** XXX' > WARNINGS
                    375: 	rm -f $(SOURCE)/tar_WARNINGS
                    376: 	make warningnote
                    377: 
                    378: sanitycheck:
                    379: 	cat $(SOURCE)/doc/loncapafiles/sanitycheck.piml | \
                    380: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
                    381: 	tee -a WARNINGS
                    382: 
                    383: updatequery:
                    384: 	cat $(SOURCE)/doc/loncapafiles/updatequery.piml | \
                    385: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(QUERYLAUNCH)
                    386: 
1.130     albertel  387: reseval_fixup:
                    388: 	cat $(SOURCE)/doc/loncapafiles/reseval_fixup.piml | \
                    389: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
                    390: 	tee -a WARNINGS
                    391: 
1.137     albertel  392: clearoutoldspreadsheetcache:
                    393: 	cat $(SOURCE)/doc/loncapafiles/clearoutoldspreadsheetcache.piml | \
                    394: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
                    395: 	tee -a WARNINGS
                    396: 
1.133     harris41  397: sendmail_fix:
                    398: 	cat $(SOURCE)/doc/loncapafiles/sendmail_fix.piml | \
                    399: 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
                    400: 	tee -a WARNINGS
                    401: 
1.129     harris41  402: postinstall:
                    403: 	make webserverconf
1.130     albertel  404: 	make reseval_fixup
1.137     albertel  405: 	make clearoutoldspreadsheetcache
1.129     harris41  406: 	make sanitycheck
1.133     harris41  407: 	make sendmail_fix
1.129     harris41  408: 
                    409: VERSION:
                    410: 	install -d $(TARGET)/etc
                    411: 	echo -n "LON-CAPA release $(VERSION)-" > $(TARGET)/etc/loncapa-release
                    412: 	date +"%Y%m%d" >> $(TARGET)/etc/loncapa-release
                    413: 
                    414: aboutVERSION:
                    415: 	cat $(SOURCE)/loncom/license/about.html | \
                    416: 	perl -e '$$d=`date +"%Y%m%d"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \
                    417: 	$(SOURCE)/loncom/license/about.html.new
                    418: 	mv -v $(SOURCE)/loncom/license/about.html.new \
                    419: 	$(SOURCE)/loncom/license/about.html
                    420: 
                    421: # ========= *** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml ***
                    422: 
                    423: Makefile.configinstall: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml \
                    424:                         lpml_parse.pl
                    425: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    426: 	perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "$(SOURCE)" \
                    427: 	"$(TARGET)" > Makefile.configinstall
                    428: 
                    429: Makefile.build: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
                    430: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    431: 	perl lpml_parse.pl build $(CATEGORY) $(DIST) "$(SOURCE)" "$(TARGET)" \
                    432: 	> Makefile.build
                    433: 
                    434: Makefile.install: alwaysrun
                    435: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    436: 	perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
                    437: 	"$(TARGET)" > Makefile.install
                    438: 
                    439: # ============= *** TARGETS FOR OPERATING ON FILESYSTEMS ACROSS THE NETWORK ***
                    440: 
1.66      harris41  441: lpmladm:
                    442: 	@if (test $(METAMTARGET) = "TRANSPORT"); then \
                    443: 		echo "Transporting to $(HOSTNAME)"; \
                    444: 		sudo make DIST=$(DIST) CATEGORY=$(CATEGORY) \
                    445: 		SOURCE="$(SOURCE)" \
                    446: 		TARGET="lpmladm.$(TIMESTAMP)" \
                    447: 		NORESTORECONF="$(NORESTORECONF)" "$(MTARGET)"; \
                    448: 		cd lpmladm.$(TIMESTAMP); \
                    449: 		sudo tar czvf ../tarball$(TIMESTAMP).tar.gz .; \
                    450: 		cd ..; scp tarball$(TIMESTAMP).tar.gz \
                    451: 		lpmladm@$(HOSTNAME):~/tarball$(TIMESTAMP).tar.gz; \
                    452: 		ssh lpmladm@$(HOSTNAME) sudo mv tarball$(TIMESTAMP).tar.gz /; \
                    453: 		ssh lpmladm@$(HOSTNAME) sudo tar -x -z -v -C / \
                    454: 		-p --same-owner -f \
                    455: 		/tarball$(TIMESTAMP).tar.gz; \
                    456: 		ssh lpmladm@$(HOSTNAME) sudo rm -f \
                    457: 		/tarball$(TIMESTAMP).tar.gz; \
                    458: 	elif (test $(METAMTARGET) = "LAUNCH"); then \
                    459: 		echo "Launching process on $(HOSTNAME)"; \
                    460: 		LAUNCHSAVE=$(OUTSTREAM) $(SAVE); \
                    461: 		make DIST=$(DIST) CATEGORY=$(CATEGORY) SOURCE="$(SOURCE)" \
                    462: 		TARGET="$(TARGET)" NORESTORECONF="$(NORESTORECONF)" \
                    463: 		LAUNCH="$(LAUNCHSAVE)" "$(MTARGET)"; \
                    464: 		scp $(SAVE) lpmladm@$(HOSTNAME):~/$(SAVE); \
                    465: 		ssh lpmladm@$(HOSTNAME) sudo perl $(SAVE); \
                    466: 		ssh lpmladm@$(HOSTNAME) sudo rm -f $(SAVE); \
                    467: 	else \
                    468: 		echo "**** ERROR **** Incorrect METAMTARGET"; \
                    469: 	fi
                    470: 
1.149     albertel  471: NET_hosts_and_domain_tab:
1.129     harris41  472: 	make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
1.149     albertel  473: 	MTARGET="hosts_and_domain_tab" HOSTNAME="$(HOSTNAME)" lpmladm
1.129     harris41  474: 
                    475: NET_webserverconf:
                    476: 	make TIMESTAMP=`date +"%s"` METAMTARGET="LAUNCH" \
                    477: 	MTARGET="webserverconf" HOSTNAME="$(HOSTNAME)" lpmladm
                    478: 
                    479: NET_rawinstall:
                    480: 	make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
                    481: 	MTARGET="rawinstall" HOSTNAME="$(HOSTNAME)" lpmladm
                    482: 
                    483: # ============== *** TARGETS FOR MAKING LISTS (MANIFESTS) OF LON-CAPA FILES ***
                    484: 
                    485: MANIFEST_all:
                    486: 	# --------------------------------------------------------- start clean
                    487: 	rm -f $(SOURCE)/MANIFEST
                    488: 	make MANIFEST_lpml
                    489: 	make MANIFEST_vanillatar
                    490: 	make MANIFEST_cvs
                    491: 	# ---------------------------------- might as well include the MANIFEST
                    492: 	echo 'MANIFEST' >> $(SOURCE)/MANIFEST
                    493: 	# ------------------------------------------ hosts.tab are belong to us
                    494: 	echo 'loncom/rawhide_hosts.tab' >> $(SOURCE)/MANIFEST
                    495: 	echo 'loncom/production_hosts.tab' >> $(SOURCE)/MANIFEST
                    496: 	echo 'loncom/development_hosts.tab' >> $(SOURCE)/MANIFEST
1.147     albertel  497: 	echo 'loncom/production_domain.tab' >> $(SOURCE)/MANIFEST
                    498: 	echo 'loncom/development_domain.tab' >> $(SOURCE)/MANIFEST
1.129     harris41  499: 	# ------------------ Files needed for dynamically generated directories
                    500: 	echo 'doc/man' >> $(SOURCE)/MANIFEST
                    501: 	echo 'doc/lib' >> $(SOURCE)/MANIFEST
                    502: 	echo 'doc/lib/perl' >> $(SOURCE)/MANIFEST
                    503: 	echo 'doc/lib/perl/Apache' >> $(SOURCE)/MANIFEST
                    504: 	echo 'doc/scripts' >> $(SOURCE)/MANIFEST
                    505: 	# --------------------------------------------------- Clean up MANIFEST
                    506: 	cd $(SOURCE); \
                    507: 	sort MANIFEST | perl -nle 'print "$(DIRTARGET)/$$_"' | \
                    508: 	perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
                    509: 	perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
                    510: 	perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
                    511: 	perl -nle 's/\/\.\//\//g;print' | sort | uniq > \
                    512: 	MANIFEST_loncapa
                    513: 	cd $(SOURCE); mv -v MANIFEST_loncapa MANIFEST
                    514: 
                    515: # --------------- MANIFEST files with important CVS versioning/date information
                    516: MANIFEST_cvs:
                    517: 	# ------ CVS/Entries directories to retain 'time-checking' intelligence
                    518: 	cd $(SOURCE); find . -type f -name 'Entries' | grep 'CVS/Entries' >> \
                    519: 	MANIFEST
                    520: 
                    521: # ------------------- MANIFEST the building, testing and standard loncapa files
                    522: MANIFEST_lpml:
                    523: 	cat $(SOURCE)/doc/loncapafiles/buildfiles.lpml | \
                    524: 	perl lpml_parse.pl MANIFEST development default \
                    525: 	'$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
                    526: 	cat $(SOURCE)/doc/loncapafiles/testfiles.lpml | \
1.140     harris41  527: 	perl lpml_parse.pl MANIFEST development default \
                    528: 	'$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
                    529: 	cat $(SOURCE)/doc/loncapafiles/installfiles.lpml | \
1.129     harris41  530: 	perl lpml_parse.pl MANIFEST development default \
                    531: 	'$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
                    532: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    533: 	perl lpml_parse.pl MANIFEST development default \
                    534: 	'$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
                    535: 
                    536: # ------------ Files for top-level (the vanilla layer that the user first sees)
                    537: MANIFEST_vanillatar:
                    538: 	echo 'README' >> $(SOURCE)/MANIFEST
                    539: 	echo 'UPDATE' >> $(SOURCE)/MANIFEST
                    540: 	echo 'TEST' >> $(SOURCE)/MANIFEST
                    541: 	echo 'CHECKRPMS' >> $(SOURCE)/MANIFEST
                    542: 
                    543: # =============================================== *** STATUS REPORT TARGETS ***
                    544: 
                    545: warningnote:
                    546: 	@if (test -s WARNINGS); then \
                    547: 		W=`grep -c '\*\*\*\* WARNING' WARNINGS`; \
                    548: 		E=`grep -c '\*\*\*\* ERROR' WARNINGS`; \
                    549: 		N=`grep -c '\*\*\*\* NOTE' WARNINGS`; \
                    550: 		echo "--->  $$W WARNINGS ENCOUNTERED!       "; \
                    551: 		echo "--->  $$E ERRORS ENCOUNTERED!         "; \
                    552: 		echo "--->  $$N NOTES ENCOUNTERED!          "; \
                    553: 		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
                    554: 		echo "!!!!  Please read the WARNINGS file !!!!"; \
                    555: 		echo "!!!!   to make sure everything is   !!!!"; \
                    556: 		echo "!!!!    correct and taken care of   !!!!"; \
                    557: 		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
                    558: 	fi
                    559: 
1.3       harris41  560: HTML:
                    561: 	install -d HTML
1.80      harris41  562: 	cp $(SOURCE)/doc/loncapafiles/*.gif HTML
                    563: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    564: 	perl lpml_parse.pl html development default "$(SOURCE)" '$(TARGET)' \
                    565: 	> HTML/index.html
1.3       harris41  566: 
1.8       harris41  567: status:
1.7       harris41  568: 	install -d HTML
1.80      harris41  569: 	cp $(SOURCE)/doc/loncapafiles/*.gif HTML
                    570: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    571: 	perl lpml_parse.pl html $(CATEGORY) $(DIST) "$(SOURCE)" "($TARGET)" | \
1.49      harris41  572: 	perl lpml_html_posteval.pl > \
1.39      harris41  573: 	HTML/filestatus.html
1.48      harris41  574: 
1.22      harris41  575: statuspost: status
1.80      harris41  576: 	cp $(SOURCE)/doc/loncapafiles/*.gif \
                    577: 	$(TARGET)/home/httpd/html/lon-status
1.52      harris41  578: 	cp HTML/filestatus.html \
                    579: 	$(TARGET)/home/httpd/html/lon-status/filestatus.html
1.22      harris41  580: 
1.33      harris41  581: rpmstatus:
                    582: 	install -d RPMSTATUS
1.52      harris41  583: 	rpm -qa --queryformat \
                    584: 	'%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > \
                    585: 	RPMSTATUS/current.tmp
1.80      harris41  586: 	cat $(SOURCE)/doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
                    587: 	cat $(SOURCE)/doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
1.52      harris41  588: 	perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp \
                    589: 	RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
1.33      harris41  590: 
                    591: rpmstatuspost: rpmstatus
                    592: 	cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
                    593: 
1.129     harris41  594: # ======================================= *** ALTERNATIVE PACKAGING TARGETS ***
1.8       harris41  595: 
1.55      harris41  596: RPM: BinaryRoot base_rpm_file_list
1.80      harris41  597: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.63      harris41  598: 	perl lpml_parse.pl make_rpm $(CATEGORY) $(DIST) $(SOURCE) $(TARGET) \
                    599: 	> base_customizerpm.xml
1.142     harris41  600: 	cat base_rpm_file_list.txt | perl make_rpm.pl base $(VERSION) \
                    601: 	$(RELEASE) '' '' BinaryRoot base_customizerpm.xml
1.55      harris41  602: 
1.60      harris41  603: DPKG:
1.82      harris41  604: 	make TARGET='lon-capa-$(VERSION)' NORESTORECONF='1' install
1.60      harris41  605: 	@echo "You will next need to follow instructions at:"
                    606: 	@echo "http://people.debian.org/~jaldhar/make_package1.html"
                    607: 	@echo "A directory with a snapshot of the debian package files"
                    608: 	@echo "is LON-CAPA-base."
1.82      harris41  609: # What DPKG steps need to happen (for future implementation):
                    610: # export EMAIL="" ... probably sharrison@mail.lon-capa.org
                    611: # deb-make
                    612: # edit debian/control
                    613: # make debian/dirs file
                    614: # make debian/copyright file
                    615: # debian/README.debian... point them to LON-CAPA URLS
                    616: # debian/changelog
                    617: # debian/conffiles
                    618: # debuild
                    619: # and maybe do some GPG-related steps around here
1.55      harris41  620: 
                    621: base_rpm_file_list:
1.80      harris41  622: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.55      harris41  623: 	perl lpml_parse.pl rpm_file_list $(CATEGORY) $(DIST) $(SOURCE) \
                    624: 	'BinaryRoot' | sort > base_rpm_file_list.txt
1.6       harris41  625: 
1.55      harris41  626: BinaryRoot: base_rpm_file_list
                    627: 	make TARGET='BinaryRoot' NORESTORECONF='1' install
1.23      harris41  628: 
1.129     harris41  629: # ======================================== *** MASTER DOCUMENTATION TARGETS ***
                    630: 
1.62      harris41  631: # Generates CVS:loncom/build/docs; root location of install.lon-capa.org
                    632: doc:
                    633: 	install -d docs
1.99      harris41  634: 	@if (test -e installation_manual.pdf); then \
                    635: 		cp -vf installation_manual.pdf docs/.; \
                    636: 	else \
                    637: 		touch docs/installation_manual.pdf; \
                    638: 	fi
1.62      harris41  639: 	install -m 0755 -d docs/icons
1.80      harris41  640: 	install -m 0644 $(SOURCE)/doc/icons/[^C][^V]* docs/icons
1.62      harris41  641: 	install -m 0755 -d docs/reconfig
1.99      harris41  642: 	cd docs; ln -fs installation_manual.pdf index.pdf
                    643: 	cd docs/reconfig; ln -fs ../installation_manual.pdf index.pdf
1.80      harris41  644: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    645: 		$(SOURCE)/doc/build/reconfig.html > docs/reconfig/index.html
1.62      harris41  646: 	install -m 0755 -d docs/reconfig/confexamples
1.80      harris41  647: 	install -m 0644 $(SOURCE)/doc/build/confexamples/[^C][^V]* \
1.62      harris41  648: 		docs/reconfig/confexamples
1.80      harris41  649: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    650: 		$(SOURCE)/doc/build/installindex.html > docs/index.html
1.67      harris41  651: 	install -m 0755 -d docs/license
1.99      harris41  652: 	cd docs/license; ln -fs ../installation_manual.pdf index.pdf
1.80      harris41  653: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    654: 		$(SOURCE)/doc/build/license.html > docs/license/index.html
1.67      harris41  655: 	install -m 0755 -d docs/contact
1.99      harris41  656: 	cd docs/contact; ln -fs ../installation_manual.pdf index.pdf
1.80      harris41  657: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    658: 		$(SOURCE)/doc/build/contact.html > docs/contact/index.html
1.68      harris41  659: 	install -m 0755 -d docs/faq
1.99      harris41  660: 	cd docs/faq; ln -fs ../installation_manual.pdf index.pdf
1.80      harris41  661: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    662: 		$(SOURCE)/doc/build/faq.html > docs/faq/index.html
1.69      harris41  663: 	install -m 0755 -d docs/downloads
1.99      harris41  664: 	cd docs/downloads; ln -fs ../installation_manual.pdf download.pdf
1.80      harris41  665: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    666: 		$(SOURCE)/doc/build/download.html > docs/downloads/index.html
1.69      harris41  667: 	install -m 0755 -d docs/install
1.99      harris41  668: 	cd docs/install; ln -fs ../installation_manual.pdf install.pdf
1.80      harris41  669: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    670: 		$(SOURCE)/doc/build/install.html > docs/install/index.html
1.125     harris41  671: 	cp -v $(SOURCE)/doc/install/redhat7.3/new_install_rh73.html \
                    672: 		docs/install/rh73.html
1.127     harris41  673: 	cp -v $(SOURCE)/doc/install/redhat7.3/new_install_rh73.html \
1.128     harris41  674: 		docs/downloads/rh73.html
1.69      harris41  675: 	install -m 0755 -d docs/upgrade
1.99      harris41  676: 	cd docs/upgrade; ln -fs ../installation_manual.pdf upgrade.pdf
1.80      harris41  677: 	perl doc_template.pl $(SOURCE)/doc/templates/template.html \
                    678: 		$(SOURCE)/doc/build/upgrade.html > docs/upgrade/index.html
1.62      harris41  679: 	cd docs; tar czvpf ../docs.tar.gz .
                    680: 
1.99      harris41  681: pdfdoc: TEST_html2ps
                    682: 	install -d pdfdoc
                    683: 	/usr/local/html2ps/bin/html2ps -D \
                    684: 	$(SOURCE)/doc/build/installindex_noform.html > pdfdoc/installindex.ps
                    685: 	/usr/local/html2ps/bin/html2ps -D \
                    686: 	$(SOURCE)/doc/build/reconfig.html | \
                    687: 	perl -nle 's/\[EXAMPLE\]/\[EXAMPLE \(at end of document\)\]/g;print' \
                    688: 	> pdfdoc/reconfig.ps
                    689: 	/usr/local/html2ps/bin/html2ps -D \
                    690: 	$(SOURCE)/doc/build/install.html > pdfdoc/install.ps
                    691: 	/usr/local/html2ps/bin/html2ps -D \
                    692: 	$(SOURCE)/doc/build/upgrade.html > pdfdoc/upgrade.ps
                    693: 	/usr/local/html2ps/bin/html2ps -D \
                    694: 	$(SOURCE)/doc/build/faq.html > pdfdoc/faq.ps
                    695: 	/usr/local/html2ps/bin/html2ps -D \
                    696: 	$(SOURCE)/doc/build/download.html > pdfdoc/download.ps
                    697: 	/usr/local/html2ps/bin/html2ps -D \
                    698: 	$(SOURCE)/doc/build/contact.html > pdfdoc/contact.ps
                    699: 	/usr/local/html2ps/bin/html2ps -D \
                    700: 	$(SOURCE)/doc/build/license.html > pdfdoc/license.ps
                    701: #       This creates a bad confexamples.ps... so take the long way around
                    702: #	cd $(SOURCE)/doc/build/confexamples; \
                    703: #	mpage -P- -1 -H [^C]* > ../../../loncom/build/pdfdoc/confexamples.ps
                    704: 	install -d pdfdoc/confexamples
                    705: 	cd $(SOURCE)/doc/build/confexamples; \
1.129     harris41  706: 	find . -type f | cut -b3- | grep -v '^C' | grep -v 'keyword' | \
                    707: 	perl -nle \
1.99      harris41  708: 	'`mpage -P- -1 -H $$_ > ../../../loncom/build/pdfdoc/confexamples/$$_.ps`;'
                    709: 	echo '' > pdfdoc/contents.txt
                    710: 	echo '' >> pdfdoc/contents.txt
                    711: 	echo '          The Learning Online Network' >> pdfdoc/contents.txt
                    712: 	echo '                    with the' >> pdfdoc/contents.txt
                    713: 	echo '     Computer-Assisted Personalized Approach' >> \
                    714: 	pdfdoc/contents.txt
                    715: 	echo '' >> pdfdoc/contents.txt
                    716: 	echo '' >> pdfdoc/contents.txt
                    717: 	echo 'CONTENTS' >> pdfdoc/contents.txt
                    718: 	echo '--------' >> pdfdoc/contents.txt
                    719: 	echo 'Opening' >> pdfdoc/contents.txt
                    720: 	echo 'Configuration' >> pdfdoc/contents.txt
                    721: 	echo 'Installation' >> pdfdoc/contents.txt
                    722: 	echo 'Upgrading a LON-CAPA Server' >> pdfdoc/contents.txt
                    723: 	echo 'FAQ' >> pdfdoc/contents.txt
                    724: 	echo 'Download' >> pdfdoc/contents.txt
                    725: 	echo 'Contact Information' >> pdfdoc/contents.txt
                    726: 	echo 'License Information' >> pdfdoc/contents.txt
                    727: 	echo 'Configuration Examples' >> pdfdoc/contents.txt
                    728: 	mpage -P- -1 \
                    729: 	pdfdoc/contents.txt \
                    730: 	pdfdoc/installindex.ps \
                    731: 	pdfdoc/reconfig.ps \
                    732: 	pdfdoc/install.ps \
                    733: 	pdfdoc/upgrade.ps \
                    734: 	pdfdoc/faq.ps \
                    735: 	pdfdoc/download.ps \
                    736: 	pdfdoc/contact.ps \
                    737: 	pdfdoc/license.ps \
                    738: 	pdfdoc/confexamples/*.ps \
                    739: 	> pdfdoc/installation_manual.ps
                    740: 	ps2pdf pdfdoc/installation_manual.ps pdfdoc/installation_manual.pdf
                    741: 	mv -vf pdfdoc/installation_manual.pdf .
                    742: 
1.129     harris41  743: # ================================================ *** KEEPING THINGS CLEAN ***
1.52      harris41  744: 
1.1       harris41  745: clean:
1.129     harris41  746: 	rm -f buildflag
1.112     harris41  747: 	rm -Rf HTML
                    748: 	rm -f installation_manual.pdf
                    749: 	rm -f Makefile.build
                    750: 	rm -f Makefile.install
                    751: 	rm -f Makefile.configinstall
                    752: 	rm -Rf BinaryRoot
                    753: 	rm -Rf SetupBinaryRoot
                    754: 	rm -Rf LON-CAPA-base
                    755: 	rm -f base_rpm_file_list.txt
                    756: 	rm -f base_customizerpm.xml
                    757: 	rm -f setup_rpm_file_list.txt
                    758: 	rm -f docs.tar.gz
                    759: 	rm -Rf docs
                    760: 	rm -Rf pdfdoc
                    761: 	rm -f program.pl*
                    762: 	rm -Rf lpmladm.*
                    763: 	rm -f WARNINGS
1.131     harris41  764: 	rm -f CPAN_STATUS_REPORT
1.114     harris41  765: 	rm -f $(SOURCE)/loncom/build/hosts.tab
1.112     harris41  766: 
                    767: reallyclean:
1.129     harris41  768: 	rm -f buildflag
1.80      harris41  769: 	rm -f $(SOURCE)/README
                    770: 	rm -f $(SOURCE)/UPDATE
                    771: 	rm -f $(SOURCE)/TEST
1.105     harris41  772: 	rm -f $(SOURCE)/MANIFEST
1.129     harris41  773: 	rm -f $(SOURCE)/MANIFEST_loncapa
1.105     harris41  774: 	rm -f $(SOURCE)/loncapa
1.114     harris41  775: 	rm -f $(SOURCE)/loncom/build/hosts.tab
1.80      harris41  776: 	rm -f $(SOURCE)/loncapa.tar.gz
1.3       harris41  777: 	rm -Rf HTML
1.99      harris41  778: 	rm -f installation_manual.pdf
1.8       harris41  779: 	rm -f Makefile.build
                    780: 	rm -f Makefile.install
1.57      harris41  781: 	rm -f Makefile.configinstall
1.55      harris41  782: 	rm -Rf BinaryRoot
                    783: 	rm -Rf SetupBinaryRoot
1.62      harris41  784: 	rm -Rf LON-CAPA-base
1.56      harris41  785: 	rm -f base_rpm_file_list.txt
1.58      harris41  786: 	rm -f base_customizerpm.xml
1.56      harris41  787: 	rm -f setup_rpm_file_list.txt
1.62      harris41  788: 	rm -f docs.tar.gz
                    789: 	rm -Rf docs
1.99      harris41  790: 	rm -Rf pdfdoc
1.66      harris41  791: 	rm -f program.pl*
                    792: 	rm -Rf lpmladm.*
1.67      harris41  793: 	make -f Makefile.cvs clean
1.80      harris41  794: 	rm -f WARNINGS
1.136     harris41  795: 
                    796: uninstall:
                    797: 	rm -f UNINSTALL_SHELL_COMMANDS
                    798: 	cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
                    799: 	perl lpml_parse.pl uninstall_shell_commands $(CATEGORY) $(DIST) \
                    800: 	"$(SOURCE)" "$(TARGET)" > UNINSTALL_SHELL_COMMANDS
                    801: 	@echo -n "**** NOTE **** A file \"UNINSTALL_SHELL_COMMANDS\" has been "
                    802: 	@echo "generated."
                    803: 	@echo "First, you should view the contents of this file."
                    804: 	@echo "If you are happy with the 'rm -Rf'! commands (or at least"
                    805: 	@echo "have another job lined up in case of catastrophe), then you "
                    806: 	@echo "can execute the following: sh ./UNINSTALL_SHELL_COMMANDS"
                    807: 
                    808: backup:
                    809: 	@echo "Not yet implemented"
                    810: 
                    811: restore:
                    812: 	@echo "Not yet implemented"
1.143     harris41  813: 
                    814: # ===================================================== *** AUXILIARY TESTS ***
                    815: localauth:
                    816: 	@if (test -e $(LOCALAUTHPATH)/localauth.pm) && \
                    817:              !(diff $(LOCALAUTHPATH)/localauth-std.pm \
                    818:               $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
                    819: 		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; \
                    820: 	elif (test -e $(LOCALAUTHPATH)/localauth.pm) && \
                    821:               (diff $(LOCALAUTHPATH)/localauth-std.pm \
                    822:               $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
                    823: 		echo "**** NOTE **** LOCAL AUTH IS IDENTICAL WITH STANDARD TEMPLATE"| tee -a WARNINGS; \
                    824: 	elif !(test -e $(LOCALAUTHPATH)/localauth.pm) && \
                    825: 	      (test -e $(LOCALAUTHPATH)/localauth-std.pm); then \
                    826: 		ln -s $(LOCALAUTHPATH)/localauth-std.pm $(LOCALAUTHPATH)/localauth.pm; \
                    827: 	fi
1.115     harris41  828: 
1.129     harris41  829: # ================================================ *** A HELPFUL DEPENDENCY ***
1.115     harris41  830: alwaysrun:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>