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