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