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