1: # The LearningOnline Network with CAPA
2:
3: # Scott Harrison
4: # $Id: Makefile,v 1.50 2001/12/19 21:27:46 harris41 Exp $
5:
6: CDTARGET="."
7: CDFSLOC="/mnt/loncapacd/install.lon-capa.org/3.1/currentcdsource"
8: DIST="default"
9: CATEGORY="development"
10:
11: all:
12: # nothing yet here
13:
14: test: TEST_lpml_scripts TEST_system_dependencies
15: @echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
16:
17: TEST_system_dependencies:
18: echo "TESTING SYSTEM DEPENDENCIES";
19: cd system_dependencies; make
20:
21: TEST_lpml_scripts:
22: echo "TESTING LPML INSTALLATION CODE";
23: cd ../test; perl filecomparetest.pl
24:
25: cd:
26: # Build temporary script to get cd
27: # make sure there is enough disk space
28: @echo "# Automatically generated Makefile for LON-CAPA" > Makefile.cd.tmp
29: @/bin/df $(CDTARGET) | perl -e '@l=<>;split(/\s+/,$$l[1]);$$s=@_[3]*1024;if ($$s>1000000000) {print "\S=1\n";} else {print "\S=0\n";}' >> Makefile.cd.tmp
30: @echo "cd:" >> Makefile.cd.tmp
31: @echo -e "ifeq (\$$(S),1)" >> Makefile.cd.tmp
32: @echo -e "\t@echo \"There is enough disk space. Good!\"" >> Makefile.cd.tmp
33: # set up commands to copy cd image from install.lon-capa.org (wget -r)
34: @echo -e "\tcd \$$(TARGET); wget -np -N -r -l 1000 http://install.lon-capa.org/3.1/currentcdsource" >> Makefile.cd.tmp
35: @echo -e "\tcd \$$(TARGET); find ./install.lon-capa.org -name index.html | xargs rm -f" >> Makefile.cd.tmp
36: # set up cvs update commands
37: # set up cd image compilation (mkisofs)
38: @echo -e "\tcd \$$(TARGET)/install.lon-capa.org/3.1/currentcdsource/; mkisofs -v -R -T -V \"LON-CAPA and Red Hat 6.2\" -b images/boot.img -c boot.cat -o \$$(TARGET)/redhat.img ." >> Makefile.cd.tmp
39: @echo -e "else" >> Makefile.cd.tmp
40: @echo -e "\t@echo \"ERROR ******* Not enough disk space. There must be at least one gigabyte free\"" >> Makefile.cd.tmp
41: @echo -e "endif" >> Makefile.cd.tmp
42: @echo -e "\t@echo \"To mount this for something like an http network install; mount -t iso9660 -o ro,loop=/dev/loop0 /mnt/drive/redhat.img /home/harris41/public_html/mount\"" >> Makefile.cd.tmp
43: make -f Makefile.cd.tmp TARGET="$(CDTARGET)" cd
44:
45: cd_cover:
46:
47: HTML:
48: install -d HTML
49: cp ../../doc/loncapafiles/*.gif HTML
50: perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > HTML/index.html
51:
52: status:
53: install -d HTML
54: cp ../../doc/loncapafiles/*.gif HTML
55: cat ../../doc/loncapafiles/loncapafiles.lpml | \
56: perl lpml_parse.pl html $(CATEGORY) $(DIST) "../.." "" | \
57: perl lpml_html_posteval.pl > \
58: HTML/filestatus.html
59:
60: oldstatus:
61: perl parse.pl ../../doc/loncapafiles/loncapafiles.html status > HTML/filestatus.html
62:
63: statuspost: status
64: cp ../../doc/loncapafiles/*.gif /home/httpd/html/lon-status
65: cp HTML/filestatus.html /home/httpd/html/lon-status/filestatus.html
66:
67: rpmstatus:
68: install -d RPMSTATUS
69: rpm -qa --queryformat '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > RPMSTATUS/current.tmp
70: cat ../../doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
71: cat ../../doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
72: perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
73:
74: rpmstatuspost: rpmstatus
75: cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
76:
77: LCMakefile:
78: perl parse.pl ../../doc/loncapafiles/loncapafiles.html LCMakefile > LCMakefile
79:
80: SPEC:
81: perl parse.pl ../../doc/loncapafiles/loncapafiles.html SPEC
82:
83: configinstall: Makefile.configinstall
84: make -f Makefile.configinstall SOURCE="../.." TARGET="" configfiles
85: perl loncaparestoreconfigurations suffix .lpmlnew
86: # make -f Makefile.configinstall TARGET="" configpermissions
87:
88: Makefile.configinstall: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
89: # perl parse.pl ../../doc/loncapafiles/loncapafiles.html configinstall > Makefile.configinstall
90: cat ../../doc/loncapafiles/loncapafiles.lpml | \
91: perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "../.." "" > \
92: Makefile.configinstall
93:
94: warningnote:
95: @if (test -s WARNINGS); then \
96: W=`grep -c '\*\*\*\* WARNING' WARNINGS`; \
97: E=`grep -c '\*\*\*\* ERROR' WARNINGS`; \
98: N=`grep -c '\*\*\*\* NOTE' WARNINGS`; \
99: echo "---> $$W WARNINGS ENCOUNTERED! "; \
100: echo "---> $$E ERRORS ENCOUNTERED! "; \
101: echo "---> $$N NOTES ENCOUNTERED! "; \
102: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
103: echo "!!!! Please read the WARNINGS file !!!!"; \
104: echo "!!!! to make sure everything is !!!!"; \
105: echo "!!!! correct and taken care of !!!!"; \
106: echo "!!!! (it is output below here) !!!!"; \
107: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
108: cat WARNINGS; \
109: fi
110:
111: install: Makefile.install
112: echo -n "" > WARNINGS
113: make -f Makefile.install SOURCE="../.." TARGET="" directories
114: make -f Makefile.install SOURCE="../.." TARGET="" files
115: make -f Makefile.install SOURCE="../.." TARGET="" links
116: make configinstall
117: make warningnote
118:
119: Makefile.install: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
120: cat ../../doc/loncapafiles/loncapafiles.lpml | \
121: perl lpml_parse.pl install $(CATEGORY) $(DIST) "../.." "" > \
122: Makefile.install
123:
124: build: Makefile.build pod2html.sh pod2man.sh
125: echo -n "" > WARNINGS
126: make -f Makefile.build all
127: make warningnote
128:
129: Makefile.build: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
130: cat ../../doc/loncapafiles/loncapafiles.lpml | \
131: perl lpml_parse.pl build $(CATEGORY) $(DIST) "../.." "" > \
132: Makefile.build
133:
134: RPM: BinaryRoot
135: cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
136: cat setup_file_list.txt | perl make_rpm.pl setup 3.1 '' '' BinaryRoot
137: cp LON-CAPA-base-3.1-1.i386.rpm $(CDFSLOC)/RedHat/RPMS/.
138: cp LON-CAPA-setup-3.1-1.i386.rpm $(CDFSLOC)/RedHat/RPMS/.
139:
140: BinaryRoot:
141: perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
142:
143: loncapaconfig:
144: rm -Rf LoncapaconfigRoot
145: install -d LoncapaconfigRoot/usr/src/
146: install -d LoncapaconfigRoot/usr/lib/python1.5/site-packages
147: install /usr/lib/python1.5/site-packages/kudzumodule.so LoncapaconfigRoot/usr/lib/python1.5/site-packages/kudzumodule.so
148: cd LoncapaconfigRoot/usr/src; cp -pR /mnt/drive/loncapaconfig .
149: install -d LoncapaconfigRoot/usr/sbin
150: @echo -e "#!/bin/sh\ncd /usr/src/loncapaconfig/usr/bin; ./loncapaconfig\n" > LoncapaconfigRoot/usr/sbin/loncapaconfig
151: chmod u+x LoncapaconfigRoot/usr/sbin/loncapaconfig
152: find LoncapaconfigRoot -type d | xargs chmod o-wxr
153: find LoncapaconfigRoot -type f | xargs chmod o-wxr
154: find LoncapaconfigRoot/ -type d | grep 'src/lon' > loncapaconfig_file_list.txt
155: find LoncapaconfigRoot/ -type d | grep '^LoncapaconfigRoot/usr/lib/python1.5/site-packages' >> loncapaconfig_file_list.txt
156: find LoncapaconfigRoot/ -type f >> loncapaconfig_file_list.txt
157: cat loncapaconfig_file_list.txt | perl make_rpm.pl loncapaconfig 3.1 '' '' LoncapaconfigRoot
158: cp LON-CAPA-loncapaconfig-3.1-1.i386.rpm /mnt/drive/install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/.
159:
160: install.lon-capa.org: cvsreport
161: install -d docs
162: install ../../doc/build/cvsreport.html docs/cvsreport.html
163: install ../../doc/build/doc.html docs/index.html
164: install -d docs/hardware
165: install ../../doc/hardware/hardware.html docs/hardware/hardware.html
166: install -d docs/3.1
167: install ../../doc/build/install.html docs/3.1/index.html
168: install ../../doc/build/instructions_with_cd.html docs/3.1/instructions_with_cd.html
169: install ../../doc/build/libraryserverconfiguration.gif docs/3.1/libraryserverconfiguration.gif
170: install ../../doc/build/librarysystemsettings.gif docs/3.1/librarysystemsettings.gif
171: install -d docs/cvsupgrade
172: install ../../doc/build/cvsupgrade.html docs/cvsupgrade/index.html
173: install -d docs/upgrade
174: install ../../doc/build/upgrade.html docs/upgrade/index.html
175: install -d docs/reconfig
176: install ../../doc/build/reconfig.html docs/reconfig/index.html
177: install -d docs/3.1/otherfiles
178: install ../../doc/otherfiles/rpm_list.txt docs/3.1/otherfiles/rpm_list.txt
179: install ../../doc/build/loncapanetwork.html docs/loncapanetwork.html
180: install ../../doc/build/loncapanfs.html docs/loncapanfs.html
181: install ../../doc/build/loncapaappleshares.html docs/loncapaappleshares.html
182: install ../../doc/build/loncapasqldatabase.html docs/loncapasqldatabase.html
183: install ../../doc/build/loncapapasswords.html docs/loncapapasswords.html
184: install ../../doc/build/loncapapasswordauthentication.html docs/loncapapasswordauthentication.html
185: install ../../doc/build/loncapatimesync.html docs/loncapatimesync.html
186: install ../../doc/build/loncapamathequivalency.html docs/loncapamathequivalency.html
187: tar czvf install.lon-capa.org_docs.tar.gz docs
188: rm -Rf docs
189:
190: cvsreport:
191: echo "<H1>Automatically generated CVS report</H1>" > ../../doc/build/cvsreport.html
192: echo "<H1>LON-CAPA Software Changes from `date --date='7 days ago' +\"%Y-%m-%d\"` to `date +\"%Y-%m-%d\"`</H1>" >> ../../doc/build/cvsreport.html
193: echo "<P>Number of altered files:" >> ../../doc/build/cvsreport.html
194: cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" loncom CAPA doc packaging 2>/dev/null | perl loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- | wc -l >> doc/build/cvsreport.html
195: echo "</P><P>Altered files:</P><P><PRE>" >> ../../doc/build/cvsreport.html
196: cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" loncom CAPA doc packaging 2>/dev/null | perl loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- >> doc/build/cvsreport.html
197: echo "</PRE></P><P>Log entries for <B>loncom</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
198: cd ../../loncom; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> ../doc/build/cvsreport.html
199: echo "</PRE></P><P>Log entries for <B>CAPA</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
200: cd ../../CAPA; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> ../doc/build/cvsreport.html
201: echo "</PRE></P><P>Log entries for <B>doc</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
202: cd ../../doc; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> ../doc/build/cvsreport.html
203: echo "</PRE></P><P>Log entries for <B>packaging</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
204: cd ../../packaging; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> ../doc/build/cvsreport.html
205: echo "</PRE></P>" >> ../../doc/build/cvsreport.html
206: clean:
207: rm -Rf HTML
208: rm -f *.spec
209: rm -f LCMakefile
210: rm -Rf BinaryRoot
211: rm -f Makefile.BinaryRoot
212: rm -f Makefile.build
213: rm -f Makefile.install
214: rm -f Makefile.install.tmp
215: rm -f Makefile.cd.tmp
216: rm -f *.rpm
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>