Annotation of loncom/build/Makefile, revision 1.191
1.48 harris41 1: # The LearningOnline Network with CAPA
2:
1.191 ! raeburn 3: # $Id: Makefile,v 1.190 2009/08/24 13:44:56 raeburn 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.179 albertel 25: VERSION=CVS_HEAD
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"
1.177 www 122: @echo "logcleanup: clean spurious logfile entries"
1.173 albertel 123: @echo "clean_file_permissions: Remove erroneous keys from the "
124: @echo " file_permissions.db"
1.165 matthew 125: @echo "accesscount_seed: Migrate the access counting mechanism from "
126: @echo " nohist_reseval.db to nohist_accesscount.db."
127: @echo "modify_config_files: Perform automatic update of the "
128: @echo " configuration files for yum and MySQL."
1.158 matthew 129: @echo "ntpcheck: test to see if ntp is installed and running."
1.171 matthew 130: @echo "html_parser_check: test functionality of HTML::Parser."
1.185 albertel 131: @echo "math_random_check: test functionality of Math::Random."
1.162 matthew 132: @echo "cron_lpmlcheck: remove cron file /etc/cron.d/loncapa.lpml."
1.172 matthew 133: @echo "chkconfig: test runlevels of httpd and loncontrol."
1.159 matthew 134: @echo "rpmcheck: test to see if rpms known to confict are installed."
1.176 albertel 135: @echo "wrap_setuid: put a C wrapper around setuid scripts."
1.186 raeburn 136: @echo "latex_fixup: regenerate ls-R database for the latex base."
1.188 raeburn 137: @echo "picins_check: check for picins.sty, retrieve and rebuild"
138: @echo " filename databases used by LaTeX"
1.189 raeburn 139: @echo "mimetex_version_check: check if mimetex.cgi version has changed,"
140: @echo " if so remove files from mimetexcache."
1.191 ! raeburn 141: @echo "latex_fmtutil: run utility to maintain TeX format files system-wide."
1.129 harris41 142: @echo "updatequery: solicit the user for machine configuration"
143: @echo " information; to be incorporated during an update"
144: @echo " procedure (via the UPDATE command)"
145: @echo "postinstall: double-check things after installation"
146: @echo "VERSION: tag the filesystem with version information inside"
1.153 www 147: @echo " /etc/loncapa-release and"
148: @echo " /home/httpd/html/lon-status/version.txt"
1.129 harris41 149: @echo "aboutVERSION: place version information inside about.html"
1.153 www 150: @echo " and loncapa_apache.conf"
1.129 harris41 151: @echo "*** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml ***"
152: @echo "Makefile.configinstall: generate a Makefile for configuration"
153: @echo " files; built dynamically from"
154: @echo " loncapafiles.lpml"
155: @echo "Makefile.build: generate a Makefile for compiling"
156: @echo " files inside the source directory; "
157: @echo " Makefile.build is generated from"
158: @echo " loncapafiles.lpml"
159: @echo "Makefile.install: generate a Makefile for installing"
160: @echo " files; built dynamically from"
161: @echo " loncapafiles.lpml"
162: @echo "*** TARGETS FOR OPERATING ON FILESYSTEMS ACROSS THE NETWORK ***"
163: @echo "lpmladm: coordinates username=lpmladm mediated secure shell"
164: @echo " processes; needed for the NET_* targets"
1.149 albertel 165: @echo "NET_hosts_and_domain_tab: install the hosts.tab and domain.tab"
166: @echo " to a filesystem elsewhere"
167: @echo " on the network"
1.129 harris41 168: @echo "NET_webserverconf: fine-tune the web server configuration on a"
169: @echo " filesystem elsewhere on the network"
170: @echo "NET_rawinstall: launch the rawinstall target on a filesystem"
171: @echo " elsewhere on the network"
172: @echo "*** TARGETS FOR MAKING LISTS (MANIFESTS) OF LON-CAPA FILES ***"
173: @echo "MANIFEST_all: generate a list of all files to be included in"
174: @echo " the distributed tarball"
175: @echo "MANIFEST_cvs: essentially a list of all CVS/Entries files used"
176: @echo " for 'time-checking' intelligence"
1.134 albertel 177: @echo "MANIFEST_lpml: a list of all LON-CAPA files to be installed,"
1.129 harris41 178: @echo " compile from, used as building software, and"
179: @echo " testing"
180: @echo "MANIFEST_vanillatar: 'README'-type top-level files that a user"
181: @echo " of the distributed tarball would first"
182: @echo " look at and work with"
183: @echo "*** STATUS REPORT TARGETS ***"
184: @echo "warningnote: analyze the WARNINGS file and produce a synopsis"
185: @echo " and recommended action to the user"
1.52 harris41 186: @echo "HTML: generate an HTML-formatted description of the LON-CAPA"
1.129 harris41 187: @echo " source files"
188: @echo "status: compare the TARGET filesystem with a compiled loncapa "
1.52 harris41 189: @echo " source directory"
190: @echo "statuspost: post the results of "make status" to "
191: @echo " TARGET/home/httpd/html/lon-status/filestatus.html"
192: @echo "rpmstatus: compare the rpms on a system to defined lists "
1.129 harris41 193: @echo " loncapa/doc/otherfiles/cd_rpms and "
194: @echo " loncapa/doc/otherfiles/rpm_list.txt"
195: @echo "rpmstatuspost: post the results of 'make rpmstatus' to "
1.52 harris41 196: @echo " TARGET/home/httpd/html/lon-status/rpmstatus.html"
1.129 harris41 197: @echo "*** ALTERNATIVE PACKAGING TARGETS ***"
198: @echo "RPM: build LON-CAPA-base RPM from loncapa source repository"
199: @echo " (still under development)"
200: @echo "DPKG: build a loncapa Debian package from loncapa source"
201: @echo " repository (still under development)"
202: @echo "base_rpm_file_list: create a file listing to be used for"
203: @echo " generating an RPM software package"
204: @echo "BinaryRoot: create a BinaryRoot directory to be used for"
205: @echo " generating an RPM software package"
206: @echo "*** MASTER DOCUMENTATION TARGETS ***"
207: @echo "doc: generate web-page documentation for install.lon-capa.org"
208: @echo " (and eventually for documentation on installed machines)"
209: @echo "pdfdoc: make a PDF-formatted compilation of all installation"
210: @echo " documentation"
211: @echo "*** KEEPING THINGS CLEAN ***"
212: @echo "clean: remove any files that might (even by remote chance)"
213: @echo " interfere with rebuilding/recompiling software"
214: @echo "reallyclean: remove all files that were generated during"
215: @echo " building or compilation of the software"
1.136 harris41 216: @echo "uninstall: remove all directories that do not contain files"
217: @echo " from other software packages and that do not contain"
218: @echo " student and instructor data; NOTE THAT THIS IS"
219: @echo " INTERACTIVE--you will be given a final chance"
220: @echo " to look at what will and will not be deleted."
221: @echo " Still, be careful. This is a very new target and is"
222: @echo " an alpha-level software feature for now."
223: @echo "backup: rolls a tarball backup of all important student and "
224: @echo " instructor data (NOT YET IMPLEMENTED)"
225: @echo "restore: reseeds a LON-CAPA server with tarball backups "
226: @echo " generated by \"make backup\" (NOT YET IMPLEMENTED)"
1.143 harris41 227: @echo "*** AUXILIARY TESTS ***"
228: @echo "localauth: tests to see if localauth exists or not and run"
229: @echo " appropriate tests"
1.129 harris41 230: @echo "*** A HELPFUL DEPENDENCY ***"
231: @echo "alwaysrun: blank target that is a dependency for targets"
232: @echo " that should \"always run\""
233:
234: # =========================== *** RUNNING TESTS TO ENSURE SOLID PERFORMANCE ***
1.1 harris41 235:
1.52 harris41 236: test: TEST_lpml_scripts TEST_system_dependencies TEST_web_layer
1.41 harris41 237: @echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
238:
239: TEST_system_dependencies:
1.52 harris41 240: @echo "TESTING SYSTEM DEPENDENCIES"
1.41 harris41 241: cd system_dependencies; make
1.44 harris41 242:
243: TEST_lpml_scripts:
1.52 harris41 244: @echo "TESTING LPML INSTALLATION CODE"
1.44 harris41 245: cd ../test; perl filecomparetest.pl
1.41 harris41 246:
1.52 harris41 247: TEST_web_layer:
1.77 harris41 248: @echo "TESTING WEB LAYER"
249: cd weblayer_test; make
1.2 harris41 250:
1.63 harris41 251: TEST_hosts_tab:
252: @echo "Testing hosts.tab"
1.120 albertel 253: @if (test -e ../hosts.tab); then \
1.129 harris41 254: echo "there is a defined link or file; assume okay"; \
1.63 harris41 255: else echo "**** ERROR **** hosts.tab not defined!" && \
256: echo -n "You need to do one of the following within your " && \
1.92 harris41 257: echo "CVS repository (cd loncapa/loncom)" && \
1.187 droeschl 258: echo " 1) ln -s production_dns_hosts.tab dns_hosts.tab" && \
259: echo " 2) ln -s development_dns_hosts.tab dns_hosts.tab" && \
1.92 harris41 260: echo "or 3) ln -s rawhide_hosts.tab hosts.tab" && \
1.63 harris41 261: echo "(you most likely want option #1, production_hosts.tab)" && \
262: exit 1; \
263: fi
1.64 harris41 264:
1.149 albertel 265: TEST_domain_tab:
266: @echo "Testing domain.tab"
267: @if (test -e ../domain.tab); then \
268: echo "there is a defined link or file; assume okay"; \
269: else echo "**** ERROR **** domain.tab not defined!" && \
270: echo -n "You need to do one of the following within your " && \
271: echo "CVS repository (cd loncapa/loncom)" && \
1.187 droeschl 272: echo " 1) ln -s production_dns_domain.tab dns_domain.tab" && \
273: echo " 2) ln -s development_dns_domain.tab dns_domain.tab" && \
1.149 albertel 274: echo "or 3) ln -s rawhide_domain.tab domain.tab" && \
275: echo "(you most likely want option #1, production_domain.tab)" && \
276: exit 1; \
277: fi
278:
1.129 harris41 279: TEST_html2ps:
280: @if (test -e /usr/local/html2ps/bin/html2ps); then \
281: echo "I can find html2ps; assume okay"; \
282: else \
283: echo "**** ERROR **** cannot find /usr/local/html2ps/bin/html2ps!" && \
284: echo "Please visit http://www.tdb.uu.se/~jan/html2ps.html" && \
285: exit 1; \
286: fi
287:
288: # ======================= *** GENERAL TARGETS SUCH AS 'build' AND 'install' ***
289:
290: build: Makefile.build pod2html.sh pod2man.sh
291: install -d $(SOURCE)/doc/man
292: install -d $(SOURCE)/doc/scripts
293: install -d $(SOURCE)/doc/lib/perl/Apache
294: echo -n "" > WARNINGS
295: make -f Makefile.build all
296: echo '1' > buildflag
297: make warningnote
298:
299: buildflag:
300: @echo "**** ERROR **** You need to run 'make build' first" > WARNINGS
301: make warningnote
302: @need_to_run_make_build_first 2>/dev/null
303:
304: configinstall: Makefile.configinstall
305: make -f Makefile.configinstall SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
306: configfiles
307: if (test "0" = $(NORESTORECONF)); then \
308: perl loncaparestoreconfigurations suffix .lpmlnew; fi
309:
1.149 albertel 310: install: buildflag VERSION TEST_hosts_tab TEST_domain_tab Makefile.install Makefile
1.129 harris41 311: echo -n "" > WARNINGS
312: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
313: directories
314: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
315: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
316: make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
317: NORESTORECONF="$(NORESTORECONF)" configinstall
318: make postinstall
319: make warningnote
1.151 albertel 320: @echo "You can now run 'make test' to see if your system is ready to go!"
321: # @echo "NOTE THAT YOUR SYSTEM MUST HAVE MYSQL WITH A USER=\"www\" AND"
322: # @echo -n "PASSWORD=\"localhostkey\" FOR www\@localhost"
323: # @echo -n "(YOU MAY NEED TO REINITIALIZE YOUR MYSQL www\@localhost USER)"
324: # @echo -n "Please see http://install.lon-capa.org/ for more information"
1.129 harris41 325:
326: rawinstall: VERSION Makefile.install Makefile
327: echo -n "" > WARNINGS
328: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
329: directories
330: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
331: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
332: make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
333: NORESTORECONF="$(NORESTORECONF)" configinstall
1.66 harris41 334:
1.149 albertel 335: hosts_and_domain_tab: TEST_hosts_tab TEST_domain_tab
1.80 harris41 336: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
337: perl xfml_parse.pl $(SOURCE)/doc/loncapafiles/valid_hosts.xfml | \
1.64 harris41 338: perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
339: "$(TARGET)" > Makefile.install
1.66 harris41 340: make -f Makefile.install directories
1.64 harris41 341: make -f Makefile.install files
1.149 albertel 342: @echo "If hosts.tab or domain.tab has changed, restart httpd and loncontrol:"
1.64 harris41 343: @echo " /etc/rc.d/init.d/httpd restart"
344: @echo " /etc/rc.d/init.d/loncontrol restart"
345:
1.129 harris41 346: webserverconf:
347: cat $(SOURCE)/doc/loncapafiles/webserver.piml | \
1.168 albertel 348: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
349: tee -a WARNINGS
1.129 harris41 350:
351: # ---------------- Top-level files such as README, UPDATE, CHECKRPMS, and TEST
352: vanillatar:
353: # --------------------------- Point UPDATE to the internal make process
1.180 albertel 354: cp $(SOURCE)/loncom/UPDATE $(SOURCE)/UPDATE
1.129 harris41 355: # ----------------------------- Point TEST to the internal make process
356: echo '#!/bin/sh' > $(SOURCE)/TEST
357: echo 'cd loncom/build; make test' >> $(SOURCE)/TEST
1.132 harris41 358: echo 'cd system_dependencies || cd loncom/build/system_dependencies; cp -v CPAN_STATUS_REPORT ../../../CPAN_STATUS_REPORT' >> $(SOURCE)/TEST
1.129 harris41 359: # ----------------------------- Copy CHECKRPMS to the vanilla top-level
360: cp -v $(SOURCE)/loncom/build/CHECKRPMS $(SOURCE)/CHECKRPMS
361: # ----------------------- vanilla executables must indeed be executable
362: chmod a+rx $(SOURCE)/UPDATE
363: chmod a+rx $(SOURCE)/TEST
364: chmod a+rx $(SOURCE)/CHECKRPMS
365: # -------------------------------- Copy README to the vanilla top-level
1.146 albertel 366: #cp -v $(SOURCE)/doc/shortest_path_redhat7.2.txt $(SOURCE)/README
1.129 harris41 367:
368: tardist:
369: make MANIFEST_all
370: make vanillatar
371: # -------------------------------------------------------- Make tardist
372: @cd $(SOURCE); \
373: if (test -h $(DIRTARGET)); then \
374: echo "$(DIRTARGET) link already defined; assume okay"; \
375: else \
376: ln -s . $(DIRTARGET); \
377: fi
378: cp -v $(SOURCE)/loncom/license/about.html \
379: $(SOURCE)/loncom/license/about.html.orig
1.153 www 380: cp -v $(SOURCE)/loncom/loncapa_apache.conf \
381: $(SOURCE)/loncom/loncapa_apache.conf.orig
1.129 harris41 382: make aboutVERSION
383: cd $(SOURCE); \
384: tar --no-recursion --numeric-owner --files-from MANIFEST \
385: -h -czf $(DIRTARGET).tar.gz 2>tar_WARNINGS || [ "0" == "0" ]
386: mv -v $(SOURCE)/loncom/license/about.html.orig \
387: $(SOURCE)/loncom/license/about.html
1.153 www 388: mv -v $(SOURCE)/loncom/loncapa_apache.conf.orig \
389: $(SOURCE)/loncom/loncapa_apache.conf
1.129 harris41 390: cat $(SOURCE)/tar_WARNINGS | \
391: xargs --replace=XXX echo '**** WARNING **** XXX' > WARNINGS
392: rm -f $(SOURCE)/tar_WARNINGS
393: make warningnote
394:
1.158 matthew 395: ntpcheck:
396: cat $(SOURCE)/doc/loncapafiles/ntpcheck.piml | \
397: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
398: tee -a WARNINGS
399:
1.171 matthew 400: html_parser_check:
401: cat $(SOURCE)/doc/loncapafiles/html_parser_check.piml | \
402: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
403: tee -a WARNINGS
404:
1.185 albertel 405: math_random_check:
406: cat $(SOURCE)/doc/loncapafiles/math_random_check.piml | \
407: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
408: tee -a WARNINGS
409:
1.162 matthew 410: cron_lpmlcheck:
411: cat $(SOURCE)/doc/loncapafiles/cron_lpmlcheck.piml | \
412: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
413: tee -a WARNINGS
414:
1.172 matthew 415: chkconfig:
416: cat $(SOURCE)/doc/loncapafiles/chkconfig.piml | \
417: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
418: tee -a WARNINGS
1.162 matthew 419:
1.159 matthew 420: rpmcheck:
421: cat $(SOURCE)/doc/loncapafiles/rpmcheck.piml | \
422: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
423: tee -a WARNINGS
424:
1.129 harris41 425: sanitycheck:
426: cat $(SOURCE)/doc/loncapafiles/sanitycheck.piml | \
427: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
428: tee -a WARNINGS
429:
1.177 www 430: logcleanup:
431: cat $(SOURCE)/doc/loncapafiles/logcleanup.piml | \
432: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
433: tee -a WARNINGS
434:
1.129 harris41 435: updatequery:
436: cat $(SOURCE)/doc/loncapafiles/updatequery.piml | \
437: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(QUERYLAUNCH)
438:
1.164 matthew 439: run_searchcat:
440: cat $(SOURCE)/doc/loncapafiles/run_searchcat.piml | \
441: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(QUERYLAUNCH)
442:
1.173 albertel 443: clean_file_permissions:
444: cat $(SOURCE)/doc/loncapafiles/clean_file_permissions.piml | \
445: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
446: tee -a WARNINGS
447:
1.156 matthew 448: accesscount_seed:
449: cat $(SOURCE)/doc/loncapafiles/accesscount_seed.piml | \
450: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
451: tee -a WARNINGS
452:
1.165 matthew 453: modify_config_files:
454: cat $(SOURCE)/doc/loncapafiles/modify_config_files.piml | \
455: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
456: tee -a WARNINGS
457:
1.130 albertel 458: reseval_fixup:
459: cat $(SOURCE)/doc/loncapafiles/reseval_fixup.piml | \
460: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
461: tee -a WARNINGS
462:
1.181 albertel 463: update_queue_slots:
464: cat $(SOURCE)/doc/loncapafiles/update_queue_slots.piml | \
465: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
466: tee -a WARNINGS
467:
1.137 albertel 468: clearoutoldspreadsheetcache:
469: cat $(SOURCE)/doc/loncapafiles/clearoutoldspreadsheetcache.piml | \
470: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
471: tee -a WARNINGS
472:
1.133 harris41 473: sendmail_fix:
474: cat $(SOURCE)/doc/loncapafiles/sendmail_fix.piml | \
475: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
476: tee -a WARNINGS
477:
1.157 www 478: ownership_fix:
479: cat $(SOURCE)/doc/loncapafiles/ownership_fix.piml | \
480: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
481: tee -a WARNINGS
482:
1.176 albertel 483: wrap_setuid:
484: cat $(SOURCE)/doc/loncapafiles/wrap_setuid.piml | \
485: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
486: tee -a WARNINGS
487:
1.186 raeburn 488: latex_fixup:
489: cat $(SOURCE)/doc/loncapafiles/latex_fixup.piml | \
490: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
491: tee -a WARNINGS
492:
1.188 raeburn 493: picins_check:
494: cat $(SOURCE)/doc/loncapafiles/picins_check.piml | \
495: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
496: tee -a WARNINGS
497:
1.189 raeburn 498: mimetex_version_check:
499: cat $(SOURCE)/doc/loncapafiles/mimetex_version_check.piml | \
500: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
501: tee -a WARNINGS
502:
1.190 raeburn 503: verify_domconfiguser:
504: cat $(SOURCE)/doc/loncapafiles/verify_domconfiguser.piml | \
505: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
506: tee -a WARNINGS
507:
1.191 ! raeburn 508: latex_fmtutil:
! 509: cat $(SOURCE)/doc/loncapafiles/latex_fmtutil.piml | \
! 510: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
! 511: tee -a WARNINGS
! 512:
1.129 harris41 513: postinstall:
514: make webserverconf
1.130 albertel 515: make reseval_fixup
1.173 albertel 516: make clean_file_permissions
1.156 matthew 517: make accesscount_seed
1.182 albertel 518: make update_queue_slots
1.165 matthew 519: make modify_config_files
1.137 albertel 520: make clearoutoldspreadsheetcache
1.172 matthew 521: make chkconfig
1.159 matthew 522: make rpmcheck
1.158 matthew 523: make ntpcheck
1.171 matthew 524: make html_parser_check
1.162 matthew 525: make cron_lpmlcheck
1.129 harris41 526: make sanitycheck
1.177 www 527: make logcleanup
1.133 harris41 528: make sendmail_fix
1.157 www 529: make ownership_fix
1.176 albertel 530: make wrap_setuid
1.186 raeburn 531: make latex_fixup
1.188 raeburn 532: make picins_check
1.189 raeburn 533: make mimetex_version_check
1.190 raeburn 534: make verify_domconfiguser
1.191 ! raeburn 535: make latex_fmtutil
1.129 harris41 536: VERSION:
537: install -d $(TARGET)/etc
538: echo -n "LON-CAPA release $(VERSION)-" > $(TARGET)/etc/loncapa-release
539: date +"%Y%m%d" >> $(TARGET)/etc/loncapa-release
1.153 www 540: install -d $(TARGET)/home/httpd/html/lon-status
541: echo -n "$(VERSION)-" > $(TARGET)/home/httpd/html/lon-status/version.txt
542: date +"%Y%m%d" >> $(TARGET)/home/httpd/html/lon-status/version.txt
1.129 harris41 543:
544: aboutVERSION:
545: cat $(SOURCE)/loncom/license/about.html | \
1.183 albertel 546: perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \
1.129 harris41 547: $(SOURCE)/loncom/license/about.html.new
548: mv -v $(SOURCE)/loncom/license/about.html.new \
549: $(SOURCE)/loncom/license/about.html
1.153 www 550: cat $(SOURCE)/loncom/loncapa_apache.conf | \
1.183 albertel 551: perl -e '$$d=`date +"%Y%m%d%H"`;chomp($$d);while(<>){s/\<\!\-\- VERSION \-\-\>/$(VERSION)-$$d/; print;}' > \
1.153 www 552: $(SOURCE)/loncom/loncapa_apache.conf.new
553: mv -v $(SOURCE)/loncom/loncapa_apache.conf.new \
554: $(SOURCE)/loncom/loncapa_apache.conf
1.129 harris41 555:
556: # ========= *** Makefile.* TARGETS BUILT DYNAMICALLY FROM loncapafiles.lpml ***
557:
558: Makefile.configinstall: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml \
559: lpml_parse.pl
560: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
561: perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "$(SOURCE)" \
562: "$(TARGET)" > Makefile.configinstall
563:
564: Makefile.build: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
565: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
566: perl lpml_parse.pl build $(CATEGORY) $(DIST) "$(SOURCE)" "$(TARGET)" \
567: > Makefile.build
568:
569: Makefile.install: alwaysrun
570: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
571: perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
572: "$(TARGET)" > Makefile.install
573:
574: # ============= *** TARGETS FOR OPERATING ON FILESYSTEMS ACROSS THE NETWORK ***
575:
1.66 harris41 576: lpmladm:
577: @if (test $(METAMTARGET) = "TRANSPORT"); then \
578: echo "Transporting to $(HOSTNAME)"; \
579: sudo make DIST=$(DIST) CATEGORY=$(CATEGORY) \
580: SOURCE="$(SOURCE)" \
581: TARGET="lpmladm.$(TIMESTAMP)" \
582: NORESTORECONF="$(NORESTORECONF)" "$(MTARGET)"; \
583: cd lpmladm.$(TIMESTAMP); \
584: sudo tar czvf ../tarball$(TIMESTAMP).tar.gz .; \
585: cd ..; scp tarball$(TIMESTAMP).tar.gz \
586: lpmladm@$(HOSTNAME):~/tarball$(TIMESTAMP).tar.gz; \
587: ssh lpmladm@$(HOSTNAME) sudo mv tarball$(TIMESTAMP).tar.gz /; \
588: ssh lpmladm@$(HOSTNAME) sudo tar -x -z -v -C / \
589: -p --same-owner -f \
590: /tarball$(TIMESTAMP).tar.gz; \
591: ssh lpmladm@$(HOSTNAME) sudo rm -f \
592: /tarball$(TIMESTAMP).tar.gz; \
593: elif (test $(METAMTARGET) = "LAUNCH"); then \
594: echo "Launching process on $(HOSTNAME)"; \
595: LAUNCHSAVE=$(OUTSTREAM) $(SAVE); \
596: make DIST=$(DIST) CATEGORY=$(CATEGORY) SOURCE="$(SOURCE)" \
597: TARGET="$(TARGET)" NORESTORECONF="$(NORESTORECONF)" \
598: LAUNCH="$(LAUNCHSAVE)" "$(MTARGET)"; \
599: scp $(SAVE) lpmladm@$(HOSTNAME):~/$(SAVE); \
600: ssh lpmladm@$(HOSTNAME) sudo perl $(SAVE); \
601: ssh lpmladm@$(HOSTNAME) sudo rm -f $(SAVE); \
602: else \
603: echo "**** ERROR **** Incorrect METAMTARGET"; \
604: fi
605:
1.149 albertel 606: NET_hosts_and_domain_tab:
1.129 harris41 607: make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
1.149 albertel 608: MTARGET="hosts_and_domain_tab" HOSTNAME="$(HOSTNAME)" lpmladm
1.129 harris41 609:
610: NET_webserverconf:
611: make TIMESTAMP=`date +"%s"` METAMTARGET="LAUNCH" \
612: MTARGET="webserverconf" HOSTNAME="$(HOSTNAME)" lpmladm
613:
614: NET_rawinstall:
615: make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
616: MTARGET="rawinstall" HOSTNAME="$(HOSTNAME)" lpmladm
617:
618: # ============== *** TARGETS FOR MAKING LISTS (MANIFESTS) OF LON-CAPA FILES ***
619:
620: MANIFEST_all:
621: # --------------------------------------------------------- start clean
622: rm -f $(SOURCE)/MANIFEST
623: make MANIFEST_lpml
624: make MANIFEST_vanillatar
625: make MANIFEST_cvs
626: # ---------------------------------- might as well include the MANIFEST
627: echo 'MANIFEST' >> $(SOURCE)/MANIFEST
628: # ------------------------------------------ hosts.tab are belong to us
629: echo 'loncom/rawhide_hosts.tab' >> $(SOURCE)/MANIFEST
630: echo 'loncom/production_hosts.tab' >> $(SOURCE)/MANIFEST
631: echo 'loncom/development_hosts.tab' >> $(SOURCE)/MANIFEST
1.147 albertel 632: echo 'loncom/production_domain.tab' >> $(SOURCE)/MANIFEST
633: echo 'loncom/development_domain.tab' >> $(SOURCE)/MANIFEST
1.184 albertel 634: echo 'loncom/production_dns_hosts.tab' >> $(SOURCE)/MANIFEST
635: echo 'loncom/development_dns_hosts.tab' >> $(SOURCE)/MANIFEST
636: echo 'loncom/production_dns_domain.tab' >> $(SOURCE)/MANIFEST
637: echo 'loncom/development_dns_domain.tab' >> $(SOURCE)/MANIFEST
1.129 harris41 638: # ------------------ Files needed for dynamically generated directories
639: echo 'doc/man' >> $(SOURCE)/MANIFEST
640: echo 'doc/lib' >> $(SOURCE)/MANIFEST
641: echo 'doc/lib/perl' >> $(SOURCE)/MANIFEST
642: echo 'doc/lib/perl/Apache' >> $(SOURCE)/MANIFEST
643: echo 'doc/scripts' >> $(SOURCE)/MANIFEST
644: # --------------------------------------------------- Clean up MANIFEST
645: cd $(SOURCE); \
646: sort MANIFEST | perl -nle 'print "$(DIRTARGET)/$$_"' | \
647: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
648: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
649: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
650: perl -nle 's/\/\.\//\//g;print' | sort | uniq > \
651: MANIFEST_loncapa
652: cd $(SOURCE); mv -v MANIFEST_loncapa MANIFEST
653:
654: # --------------- MANIFEST files with important CVS versioning/date information
655: MANIFEST_cvs:
656: # ------ CVS/Entries directories to retain 'time-checking' intelligence
657: cd $(SOURCE); find . -type f -name 'Entries' | grep 'CVS/Entries' >> \
658: MANIFEST
659:
660: # ------------------- MANIFEST the building, testing and standard loncapa files
661: MANIFEST_lpml:
662: cat $(SOURCE)/doc/loncapafiles/buildfiles.lpml | \
1.167 albertel 663: perl lpml_parse.pl MANIFEST development $(DIST) \
1.129 harris41 664: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
665: cat $(SOURCE)/doc/loncapafiles/testfiles.lpml | \
1.167 albertel 666: perl lpml_parse.pl MANIFEST development $(DIST) \
1.140 harris41 667: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
668: cat $(SOURCE)/doc/loncapafiles/installfiles.lpml | \
1.167 albertel 669: perl lpml_parse.pl MANIFEST development $(DIST) \
1.129 harris41 670: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
671: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.167 albertel 672: perl lpml_parse.pl MANIFEST development $(DIST) \
1.129 harris41 673: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
674:
675: # ------------ Files for top-level (the vanilla layer that the user first sees)
676: MANIFEST_vanillatar:
677: echo 'README' >> $(SOURCE)/MANIFEST
678: echo 'UPDATE' >> $(SOURCE)/MANIFEST
679: echo 'TEST' >> $(SOURCE)/MANIFEST
680: echo 'CHECKRPMS' >> $(SOURCE)/MANIFEST
681:
682: # =============================================== *** STATUS REPORT TARGETS ***
683:
684: warningnote:
685: @if (test -s WARNINGS); then \
686: W=`grep -c '\*\*\*\* WARNING' WARNINGS`; \
687: E=`grep -c '\*\*\*\* ERROR' WARNINGS`; \
688: N=`grep -c '\*\*\*\* NOTE' WARNINGS`; \
689: echo "---> $$W WARNINGS ENCOUNTERED! "; \
690: echo "---> $$E ERRORS ENCOUNTERED! "; \
691: echo "---> $$N NOTES ENCOUNTERED! "; \
692: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
693: echo "!!!! Please read the WARNINGS file !!!!"; \
694: echo "!!!! to make sure everything is !!!!"; \
695: echo "!!!! correct and taken care of !!!!"; \
696: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
697: fi
698:
1.3 harris41 699: HTML:
700: install -d HTML
1.80 harris41 701: cp $(SOURCE)/doc/loncapafiles/*.gif HTML
702: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
703: perl lpml_parse.pl html development default "$(SOURCE)" '$(TARGET)' \
704: > HTML/index.html
1.3 harris41 705:
1.8 harris41 706: status:
1.7 harris41 707: install -d HTML
1.80 harris41 708: cp $(SOURCE)/doc/loncapafiles/*.gif HTML
709: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
710: perl lpml_parse.pl html $(CATEGORY) $(DIST) "$(SOURCE)" "($TARGET)" | \
1.49 harris41 711: perl lpml_html_posteval.pl > \
1.39 harris41 712: HTML/filestatus.html
1.48 harris41 713:
1.22 harris41 714: statuspost: status
1.80 harris41 715: cp $(SOURCE)/doc/loncapafiles/*.gif \
716: $(TARGET)/home/httpd/html/lon-status
1.52 harris41 717: cp HTML/filestatus.html \
718: $(TARGET)/home/httpd/html/lon-status/filestatus.html
1.22 harris41 719:
1.33 harris41 720: rpmstatus:
721: install -d RPMSTATUS
1.52 harris41 722: rpm -qa --queryformat \
723: '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > \
724: RPMSTATUS/current.tmp
1.80 harris41 725: cat $(SOURCE)/doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
726: cat $(SOURCE)/doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
1.52 harris41 727: perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp \
728: RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
1.33 harris41 729:
730: rpmstatuspost: rpmstatus
731: cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
732:
1.129 harris41 733: # ======================================= *** ALTERNATIVE PACKAGING TARGETS ***
1.8 harris41 734:
1.55 harris41 735: RPM: BinaryRoot base_rpm_file_list
1.80 harris41 736: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.63 harris41 737: perl lpml_parse.pl make_rpm $(CATEGORY) $(DIST) $(SOURCE) $(TARGET) \
738: > base_customizerpm.xml
1.142 harris41 739: cat base_rpm_file_list.txt | perl make_rpm.pl base $(VERSION) \
740: $(RELEASE) '' '' BinaryRoot base_customizerpm.xml
1.55 harris41 741:
1.60 harris41 742: DPKG:
1.82 harris41 743: make TARGET='lon-capa-$(VERSION)' NORESTORECONF='1' install
1.60 harris41 744: @echo "You will next need to follow instructions at:"
745: @echo "http://people.debian.org/~jaldhar/make_package1.html"
746: @echo "A directory with a snapshot of the debian package files"
747: @echo "is LON-CAPA-base."
1.82 harris41 748: # What DPKG steps need to happen (for future implementation):
749: # export EMAIL="" ... probably sharrison@mail.lon-capa.org
750: # deb-make
751: # edit debian/control
752: # make debian/dirs file
753: # make debian/copyright file
754: # debian/README.debian... point them to LON-CAPA URLS
755: # debian/changelog
756: # debian/conffiles
757: # debuild
758: # and maybe do some GPG-related steps around here
1.55 harris41 759:
760: base_rpm_file_list:
1.80 harris41 761: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.55 harris41 762: perl lpml_parse.pl rpm_file_list $(CATEGORY) $(DIST) $(SOURCE) \
763: 'BinaryRoot' | sort > base_rpm_file_list.txt
1.6 harris41 764:
1.55 harris41 765: BinaryRoot: base_rpm_file_list
766: make TARGET='BinaryRoot' NORESTORECONF='1' install
1.23 harris41 767:
1.129 harris41 768: # ======================================== *** MASTER DOCUMENTATION TARGETS ***
769:
1.163 albertel 770: buildwebsite:
771: cd ../../doc/build; perl ./generate_web_pages.pl
772:
773:
1.62 harris41 774: # Generates CVS:loncom/build/docs; root location of install.lon-capa.org
775: doc:
776: install -d docs
1.99 harris41 777: @if (test -e installation_manual.pdf); then \
778: cp -vf installation_manual.pdf docs/.; \
779: else \
780: touch docs/installation_manual.pdf; \
781: fi
1.62 harris41 782: install -m 0755 -d docs/icons
1.80 harris41 783: install -m 0644 $(SOURCE)/doc/icons/[^C][^V]* docs/icons
1.62 harris41 784: install -m 0755 -d docs/reconfig
1.99 harris41 785: cd docs; ln -fs installation_manual.pdf index.pdf
786: cd docs/reconfig; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 787: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
788: $(SOURCE)/doc/build/reconfig.html > docs/reconfig/index.html
1.62 harris41 789: install -m 0755 -d docs/reconfig/confexamples
1.80 harris41 790: install -m 0644 $(SOURCE)/doc/build/confexamples/[^C][^V]* \
1.62 harris41 791: docs/reconfig/confexamples
1.80 harris41 792: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
793: $(SOURCE)/doc/build/installindex.html > docs/index.html
1.67 harris41 794: install -m 0755 -d docs/license
1.99 harris41 795: cd docs/license; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 796: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
797: $(SOURCE)/doc/build/license.html > docs/license/index.html
1.67 harris41 798: install -m 0755 -d docs/contact
1.99 harris41 799: cd docs/contact; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 800: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
801: $(SOURCE)/doc/build/contact.html > docs/contact/index.html
1.68 harris41 802: install -m 0755 -d docs/faq
1.99 harris41 803: cd docs/faq; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 804: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
805: $(SOURCE)/doc/build/faq.html > docs/faq/index.html
1.69 harris41 806: install -m 0755 -d docs/downloads
1.99 harris41 807: cd docs/downloads; ln -fs ../installation_manual.pdf download.pdf
1.80 harris41 808: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
809: $(SOURCE)/doc/build/download.html > docs/downloads/index.html
1.69 harris41 810: install -m 0755 -d docs/install
1.99 harris41 811: cd docs/install; ln -fs ../installation_manual.pdf install.pdf
1.80 harris41 812: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
813: $(SOURCE)/doc/build/install.html > docs/install/index.html
1.125 harris41 814: cp -v $(SOURCE)/doc/install/redhat7.3/new_install_rh73.html \
815: docs/install/rh73.html
1.127 harris41 816: cp -v $(SOURCE)/doc/install/redhat7.3/new_install_rh73.html \
1.128 harris41 817: docs/downloads/rh73.html
1.69 harris41 818: install -m 0755 -d docs/upgrade
1.99 harris41 819: cd docs/upgrade; ln -fs ../installation_manual.pdf upgrade.pdf
1.80 harris41 820: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
821: $(SOURCE)/doc/build/upgrade.html > docs/upgrade/index.html
1.62 harris41 822: cd docs; tar czvpf ../docs.tar.gz .
823:
1.99 harris41 824: pdfdoc: TEST_html2ps
825: install -d pdfdoc
826: /usr/local/html2ps/bin/html2ps -D \
827: $(SOURCE)/doc/build/installindex_noform.html > pdfdoc/installindex.ps
828: /usr/local/html2ps/bin/html2ps -D \
829: $(SOURCE)/doc/build/reconfig.html | \
830: perl -nle 's/\[EXAMPLE\]/\[EXAMPLE \(at end of document\)\]/g;print' \
831: > pdfdoc/reconfig.ps
832: /usr/local/html2ps/bin/html2ps -D \
833: $(SOURCE)/doc/build/install.html > pdfdoc/install.ps
834: /usr/local/html2ps/bin/html2ps -D \
835: $(SOURCE)/doc/build/upgrade.html > pdfdoc/upgrade.ps
836: /usr/local/html2ps/bin/html2ps -D \
837: $(SOURCE)/doc/build/faq.html > pdfdoc/faq.ps
838: /usr/local/html2ps/bin/html2ps -D \
839: $(SOURCE)/doc/build/download.html > pdfdoc/download.ps
840: /usr/local/html2ps/bin/html2ps -D \
841: $(SOURCE)/doc/build/contact.html > pdfdoc/contact.ps
842: /usr/local/html2ps/bin/html2ps -D \
843: $(SOURCE)/doc/build/license.html > pdfdoc/license.ps
844: # This creates a bad confexamples.ps... so take the long way around
845: # cd $(SOURCE)/doc/build/confexamples; \
846: # mpage -P- -1 -H [^C]* > ../../../loncom/build/pdfdoc/confexamples.ps
847: install -d pdfdoc/confexamples
848: cd $(SOURCE)/doc/build/confexamples; \
1.129 harris41 849: find . -type f | cut -b3- | grep -v '^C' | grep -v 'keyword' | \
850: perl -nle \
1.99 harris41 851: '`mpage -P- -1 -H $$_ > ../../../loncom/build/pdfdoc/confexamples/$$_.ps`;'
852: echo '' > pdfdoc/contents.txt
853: echo '' >> pdfdoc/contents.txt
854: echo ' The Learning Online Network' >> pdfdoc/contents.txt
855: echo ' with the' >> pdfdoc/contents.txt
856: echo ' Computer-Assisted Personalized Approach' >> \
857: pdfdoc/contents.txt
858: echo '' >> pdfdoc/contents.txt
859: echo '' >> pdfdoc/contents.txt
860: echo 'CONTENTS' >> pdfdoc/contents.txt
861: echo '--------' >> pdfdoc/contents.txt
862: echo 'Opening' >> pdfdoc/contents.txt
863: echo 'Configuration' >> pdfdoc/contents.txt
864: echo 'Installation' >> pdfdoc/contents.txt
865: echo 'Upgrading a LON-CAPA Server' >> pdfdoc/contents.txt
866: echo 'FAQ' >> pdfdoc/contents.txt
867: echo 'Download' >> pdfdoc/contents.txt
868: echo 'Contact Information' >> pdfdoc/contents.txt
869: echo 'License Information' >> pdfdoc/contents.txt
870: echo 'Configuration Examples' >> pdfdoc/contents.txt
871: mpage -P- -1 \
872: pdfdoc/contents.txt \
873: pdfdoc/installindex.ps \
874: pdfdoc/reconfig.ps \
875: pdfdoc/install.ps \
876: pdfdoc/upgrade.ps \
877: pdfdoc/faq.ps \
878: pdfdoc/download.ps \
879: pdfdoc/contact.ps \
880: pdfdoc/license.ps \
881: pdfdoc/confexamples/*.ps \
882: > pdfdoc/installation_manual.ps
883: ps2pdf pdfdoc/installation_manual.ps pdfdoc/installation_manual.pdf
884: mv -vf pdfdoc/installation_manual.pdf .
885:
1.129 harris41 886: # ================================================ *** KEEPING THINGS CLEAN ***
1.52 harris41 887:
1.1 harris41 888: clean:
1.129 harris41 889: rm -f buildflag
1.112 harris41 890: rm -Rf HTML
891: rm -f installation_manual.pdf
892: rm -f Makefile.build
893: rm -f Makefile.install
894: rm -f Makefile.configinstall
895: rm -Rf BinaryRoot
896: rm -Rf SetupBinaryRoot
897: rm -Rf LON-CAPA-base
898: rm -f base_rpm_file_list.txt
899: rm -f base_customizerpm.xml
900: rm -f setup_rpm_file_list.txt
901: rm -f docs.tar.gz
902: rm -Rf docs
903: rm -Rf pdfdoc
904: rm -f program.pl*
905: rm -Rf lpmladm.*
906: rm -f WARNINGS
1.131 harris41 907: rm -f CPAN_STATUS_REPORT
1.114 harris41 908: rm -f $(SOURCE)/loncom/build/hosts.tab
1.112 harris41 909:
910: reallyclean:
1.129 harris41 911: rm -f buildflag
1.80 harris41 912: rm -f $(SOURCE)/README
913: rm -f $(SOURCE)/UPDATE
914: rm -f $(SOURCE)/TEST
1.105 harris41 915: rm -f $(SOURCE)/MANIFEST
1.129 harris41 916: rm -f $(SOURCE)/MANIFEST_loncapa
1.105 harris41 917: rm -f $(SOURCE)/loncapa
1.114 harris41 918: rm -f $(SOURCE)/loncom/build/hosts.tab
1.80 harris41 919: rm -f $(SOURCE)/loncapa.tar.gz
1.3 harris41 920: rm -Rf HTML
1.99 harris41 921: rm -f installation_manual.pdf
1.8 harris41 922: rm -f Makefile.build
923: rm -f Makefile.install
1.57 harris41 924: rm -f Makefile.configinstall
1.55 harris41 925: rm -Rf BinaryRoot
926: rm -Rf SetupBinaryRoot
1.62 harris41 927: rm -Rf LON-CAPA-base
1.56 harris41 928: rm -f base_rpm_file_list.txt
1.58 harris41 929: rm -f base_customizerpm.xml
1.56 harris41 930: rm -f setup_rpm_file_list.txt
1.62 harris41 931: rm -f docs.tar.gz
932: rm -Rf docs
1.99 harris41 933: rm -Rf pdfdoc
1.66 harris41 934: rm -f program.pl*
935: rm -Rf lpmladm.*
1.67 harris41 936: make -f Makefile.cvs clean
1.80 harris41 937: rm -f WARNINGS
1.136 harris41 938:
939: uninstall:
940: rm -f UNINSTALL_SHELL_COMMANDS
941: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
942: perl lpml_parse.pl uninstall_shell_commands $(CATEGORY) $(DIST) \
943: "$(SOURCE)" "$(TARGET)" > UNINSTALL_SHELL_COMMANDS
944: @echo -n "**** NOTE **** A file \"UNINSTALL_SHELL_COMMANDS\" has been "
945: @echo "generated."
946: @echo "First, you should view the contents of this file."
947: @echo "If you are happy with the 'rm -Rf'! commands (or at least"
948: @echo "have another job lined up in case of catastrophe), then you "
949: @echo "can execute the following: sh ./UNINSTALL_SHELL_COMMANDS"
950:
951: backup:
952: @echo "Not yet implemented"
953:
954: restore:
955: @echo "Not yet implemented"
1.143 harris41 956:
957: # ===================================================== *** AUXILIARY TESTS ***
958: localauth:
959: @if (test -e $(LOCALAUTHPATH)/localauth.pm) && \
960: !(diff $(LOCALAUTHPATH)/localauth-std.pm \
961: $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
962: 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; \
963: elif (test -e $(LOCALAUTHPATH)/localauth.pm) && \
964: (diff $(LOCALAUTHPATH)/localauth-std.pm \
965: $(LOCALAUTHPATH)/localauth.pm > /dev/null); then \
966: echo "**** NOTE **** LOCAL AUTH IS IDENTICAL WITH STANDARD TEMPLATE"| tee -a WARNINGS; \
967: elif !(test -e $(LOCALAUTHPATH)/localauth.pm) && \
968: (test -e $(LOCALAUTHPATH)/localauth-std.pm); then \
969: ln -s $(LOCALAUTHPATH)/localauth-std.pm $(LOCALAUTHPATH)/localauth.pm; \
970: fi
1.115 harris41 971:
1.129 harris41 972: # ================================================ *** A HELPFUL DEPENDENCY ***
1.115 harris41 973: alwaysrun:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>