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