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