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