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