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