1: # The LearningOnline Network with CAPA
2:
3: # Scott Harrison
4: # $Id: Makefile,v 1.54 2002/01/07 22:12:21 harris41 Exp $
5:
6: DIST="default"
7: CATEGORY="development"
8: SOURCE="../.."
9: TARGET=""
10:
11: help:
12: @echo "*** You need to specify a valid target ***"
13: @echo "NOTE: You can specify options to your Makefile target."
14: @echo "(option) DIST can be redhat7.1, debian, redhat6.2, or default"
15: @echo "(option) CATEGORY can be runtime or development"
16: @echo "(option) SOURCE is an absolute or relative directory path"
17: @echo "(option) TARGET is an absolute or relative directory path"
18: @echo "build: compile the CVS source tree"
19: @echo "install: install from a compiled CVS source tree to a "
20: @echo " specified TARGET destination on the filesystem"
21: @echo "test: test different parts of the LON-CAPA system (TEST_*)"
22: @echo "TEST_lpml_scripts: make sure that the system can process "
23: @echo " the Linux Packaging Markup Language"
24: @echo "TEST_system_dependencies: make sure that all needed system "
25: @echo " components are active and present "
26: @echo " on the server such as perl modules"
27: @echo " and the MySQL database"
28: @echo "TEST_web_layer: mimic a login and various system actions on "
29: @echo " a LON-CAPA system"
30: @echo "HTML: generate an HTML-formatted description of the LON-CAPA"
31: @echo " CVS files"
32: @echo "documentation_tree: compiles a documentation tree from the "
33: @echo " CVS:doc directory"
34: @echo "status: compare the TARGET filesystem with a compiled CVS "
35: @echo " source directory"
36: @echo "statuspost: post the results of "make status" to "
37: @echo " TARGET/home/httpd/html/lon-status/filestatus.html"
38: @echo "rpmstatus: compare the rpms on a system to defined lists "
39: @echo " CVS:doc/otherfiles/cd_rpms and "
40: @echo " CVS:doc/otherfiles/rpm_list.txt"
41: @echo "rpmstatuspost: post the results of "make rpmstatus" to "
42: @echo " TARGET/home/httpd/html/lon-status/rpmstatus.html"
43:
44: test: TEST_lpml_scripts TEST_system_dependencies TEST_web_layer
45: @echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
46:
47: TEST_system_dependencies:
48: @echo "TESTING SYSTEM DEPENDENCIES"
49: cd system_dependencies; make
50:
51: TEST_lpml_scripts:
52: @echo "TESTING LPML INSTALLATION CODE"
53: cd ../test; perl filecomparetest.pl
54:
55: TEST_web_layer:
56: @echo "Testing of web layers is not yet implemented."
57:
58: HTML:
59: install -d HTML
60: cp ../../doc/loncapafiles/*.gif HTML
61: perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > \
62: HTML/index.html
63:
64: status:
65: install -d HTML
66: cp ../../doc/loncapafiles/*.gif HTML
67: cat ../../doc/loncapafiles/loncapafiles.lpml | \
68: perl lpml_parse.pl html $(CATEGORY) $(DIST) "../.." "" | \
69: perl lpml_html_posteval.pl > \
70: HTML/filestatus.html
71:
72: statuspost: status
73: cp ../../doc/loncapafiles/*.gif $(TARGET)/home/httpd/html/lon-status
74: cp HTML/filestatus.html \
75: $(TARGET)/home/httpd/html/lon-status/filestatus.html
76:
77: rpmstatus:
78: install -d RPMSTATUS
79: rpm -qa --queryformat \
80: '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > \
81: RPMSTATUS/current.tmp
82: cat ../../doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
83: cat ../../doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
84: perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp \
85: RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
86:
87: rpmstatuspost: rpmstatus
88: cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
89:
90: configinstall: Makefile.configinstall
91: make -f Makefile.configinstall SOURCE="../.." TARGET="" configfiles
92: perl loncaparestoreconfigurations suffix .lpmlnew
93:
94: Makefile.configinstall: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
95: cat ../../doc/loncapafiles/loncapafiles.lpml | \
96: perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "../.." "" > \
97: Makefile.configinstall
98:
99: warningnote:
100: @if (test -s WARNINGS); then \
101: W=`grep -c '\*\*\*\* WARNING' WARNINGS`; \
102: E=`grep -c '\*\*\*\* ERROR' WARNINGS`; \
103: N=`grep -c '\*\*\*\* NOTE' WARNINGS`; \
104: echo "---> $$W WARNINGS ENCOUNTERED! "; \
105: echo "---> $$E ERRORS ENCOUNTERED! "; \
106: echo "---> $$N NOTES ENCOUNTERED! "; \
107: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
108: echo "!!!! Please read the WARNINGS file !!!!"; \
109: echo "!!!! to make sure everything is !!!!"; \
110: echo "!!!! correct and taken care of !!!!"; \
111: echo "!!!! (it is output below here) !!!!"; \
112: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
113: cat WARNINGS; \
114: fi
115:
116: install: Makefile.install Makefile
117: echo -n "" > WARNINGS
118: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
119: directories
120: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
121: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
122: make configinstall
123: make warningnote
124:
125: Makefile.install: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
126: cat ../../doc/loncapafiles/loncapafiles.lpml | \
127: perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
128: "$(TARGET)" > Makefile.install
129:
130: build: Makefile.build pod2html.sh pod2man.sh
131: echo -n "" > WARNINGS
132: make -f Makefile.build all
133: make warningnote
134:
135: Makefile.build: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
136: cat ../../doc/loncapafiles/loncapafiles.lpml | \
137: perl lpml_parse.pl build $(CATEGORY) $(DIST) "../.." "" > \
138: Makefile.build
139:
140: RPM: BinaryRoot
141: cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
142: cat setup_file_list.txt | perl make_rpm.pl setup 3.1 '' '' BinaryRoot
143:
144: BinaryRoot:
145: perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
146:
147: loncapaconfig:
148: rm -Rf LoncapaconfigRoot
149: install -d LoncapaconfigRoot/usr/src/
150: install -d LoncapaconfigRoot/usr/lib/python1.5/site-packages
151: install /usr/lib/python1.5/site-packages/kudzumodule.so \
152: LoncapaconfigRoot/usr/lib/python1.5/site-packages/kudzumodule.so
153: cd LoncapaconfigRoot/usr/src; cp -pR /mnt/drive/loncapaconfig .
154: install -d LoncapaconfigRoot/usr/sbin
155: @echo -e "#!/bin/sh\ncd /usr/src/loncapaconfig/usr/bin; \
156: ./loncapaconfig\n" > LoncapaconfigRoot/usr/sbin/loncapaconfig
157: chmod u+x LoncapaconfigRoot/usr/sbin/loncapaconfig
158: find LoncapaconfigRoot -type d | xargs chmod o-wxr
159: find LoncapaconfigRoot -type f | xargs chmod o-wxr
160: find LoncapaconfigRoot/ -type d | grep 'src/lon' > \
161: loncapaconfig_file_list.txt
162: find LoncapaconfigRoot/ -type d | grep \
163: '^LoncapaconfigRoot/usr/lib/python1.5/site-packages' >> \
164: loncapaconfig_file_list.txt
165: find LoncapaconfigRoot/ -type f >> loncapaconfig_file_list.txt
166: cat loncapaconfig_file_list.txt | perl make_rpm.pl loncapaconfig 3.1 \
167: '' '' LoncapaconfigRoot
168: cp LON-CAPA-loncapaconfig-3.1-1.i386.rpm \
169: /mnt/drive/install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/.
170:
171: documentation_tree: cvsreport
172: install -d docs
173: install ../../doc/build/cvsreport.html docs/cvsreport.html
174: install ../../doc/build/doc.html docs/index.html
175: install -d docs/hardware
176: install ../../doc/hardware/hardware.html docs/hardware/hardware.html
177: install -d docs/3.1
178: install ../../doc/build/install.html docs/3.1/index.html
179: install ../../doc/build/instructions_with_cd.html \
180: docs/3.1/instructions_with_cd.html
181: install ../../doc/build/libraryserverconfiguration.gif \
182: docs/3.1/libraryserverconfiguration.gif
183: install ../../doc/build/librarysystemsettings.gif \
184: docs/3.1/librarysystemsettings.gif
185: install -d docs/cvsupgrade
186: install ../../doc/build/cvsupgrade.html docs/cvsupgrade/index.html
187: install -d docs/upgrade
188: install ../../doc/build/upgrade.html docs/upgrade/index.html
189: install -d docs/reconfig
190: install ../../doc/build/reconfig.html docs/reconfig/index.html
191: install -d docs/3.1/otherfiles
192: install ../../doc/otherfiles/rpm_list.txt \
193: docs/3.1/otherfiles/rpm_list.txt
194: install ../../doc/build/loncapanetwork.html docs/loncapanetwork.html
195: install ../../doc/build/loncapanfs.html docs/loncapanfs.html
196: install ../../doc/build/loncapaappleshares.html \
197: docs/loncapaappleshares.html
198: install ../../doc/build/loncapasqldatabase.html \
199: docs/loncapasqldatabase.html
200: install ../../doc/build/loncapapasswords.html \
201: docs/loncapapasswords.html
202: install ../../doc/build/loncapapasswordauthentication.html \
203: docs/loncapapasswordauthentication.html
204: install ../../doc/build/loncapatimesync.html docs/loncapatimesync.html
205: install ../../doc/build/loncapamathequivalency.html \
206: docs/loncapamathequivalency.html
207: tar czvf install.lon-capa.org_docs.tar.gz docs
208: rm -Rf docs
209:
210: cvsreport:
211:
212: clean:
213: rm -Rf HTML
214: rm -f Makefile.build
215: rm -f Makefile.install
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>