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