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