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