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