Annotation of loncom/build/Makefile, revision 1.119
1.48 harris41 1: # The LearningOnline Network with CAPA
2:
1.1 harris41 3: # Scott Harrison
1.119 ! harris41 4: # $Id: Makefile,v 1.118 2002/05/30 17:34:23 harris41 Exp $
1.1 harris41 5:
1.79 harris41 6: DISTPROBE=`perl ./distprobe`
7: DIST=$(DISTPROBE)
1.39 harris41 8: CATEGORY="development"
1.80 harris41 9: SOURCE=../..
1.51 harris41 10: TARGET=""
1.100 harris41 11: DIRTARGET=loncapa
1.55 harris41 12: NORESTORECONF="0"
1.66 harris41 13: HOSTNAME=""
14: LAUNCH=| perl
1.106 harris41 15: QUERYLAUNCH=> /tmp/loncapa_query.pl; perl /tmp/loncapa_query.pl
1.66 harris41 16: OUTSTREAM=>
17: SAVE=program.pl.$(TIMESTAMP)
18: LAUNCHSAVE=$(OUTSTREAM) $(SAVE)
19: METAMTARGET=""
20: MTARGET=""
1.82 harris41 21: VERSION=0.1
1.12 harris41 22:
1.105 harris41 23: help:
1.52 harris41 24: @echo "*** You need to specify a valid target ***"
25: @echo "NOTE: You can specify options to your Makefile target."
1.105 harris41 26: @echo "(option) DIST can be redhat7, debian, redhat6.2, or default"
1.52 harris41 27: @echo "(option) CATEGORY can be runtime or development"
28: @echo "(option) SOURCE is an absolute or relative directory path"
29: @echo "(option) TARGET is an absolute or relative directory path"
30: @echo "build: compile the CVS source tree"
31: @echo "install: install from a compiled CVS source tree to a "
32: @echo " specified TARGET destination on the filesystem"
33: @echo "test: test different parts of the LON-CAPA system (TEST_*)"
34: @echo "TEST_lpml_scripts: make sure that the system can process "
35: @echo " the Linux Packaging Markup Language"
36: @echo "TEST_system_dependencies: make sure that all needed system "
37: @echo " components are active and present "
38: @echo " on the server such as perl modules"
39: @echo " and the MySQL database"
40: @echo "TEST_web_layer: mimic a login and various system actions on "
41: @echo " a LON-CAPA system"
42: @echo "HTML: generate an HTML-formatted description of the LON-CAPA"
43: @echo " CVS files"
1.54 harris41 44: @echo "documentation_tree: compiles a documentation tree from the "
1.119 ! harris41 45: @echo " CVS:doc directory"
1.52 harris41 46: @echo "status: compare the TARGET filesystem with a compiled CVS "
47: @echo " source directory"
48: @echo "statuspost: post the results of "make status" to "
49: @echo " TARGET/home/httpd/html/lon-status/filestatus.html"
50: @echo "rpmstatus: compare the rpms on a system to defined lists "
51: @echo " CVS:doc/otherfiles/cd_rpms and "
52: @echo " CVS:doc/otherfiles/rpm_list.txt"
53: @echo "rpmstatuspost: post the results of "make rpmstatus" to "
54: @echo " TARGET/home/httpd/html/lon-status/rpmstatus.html"
1.55 harris41 55: @echo "RPM: build LON-CAPA-base RPM from CVS repository"
56: @echo "setup_RPM: build LON-CAPA-setup RPM from CVS repository"
57: @echo " handy for CD-ROM generation"
1.83 harris41 58: @echo "tardist: build a tarball that will upgrade the software on a "
59: @echo " system"
1.1 harris41 60:
1.52 harris41 61: test: TEST_lpml_scripts TEST_system_dependencies TEST_web_layer
1.41 harris41 62: @echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
63:
64: TEST_system_dependencies:
1.52 harris41 65: @echo "TESTING SYSTEM DEPENDENCIES"
1.41 harris41 66: cd system_dependencies; make
1.44 harris41 67:
68: TEST_lpml_scripts:
1.52 harris41 69: @echo "TESTING LPML INSTALLATION CODE"
1.44 harris41 70: cd ../test; perl filecomparetest.pl
1.41 harris41 71:
1.52 harris41 72: TEST_web_layer:
1.77 harris41 73: @echo "TESTING WEB LAYER"
74: cd weblayer_test; make
1.2 harris41 75:
1.63 harris41 76: TEST_hosts_tab:
77: @echo "Testing hosts.tab"
78: @if (test -h ../hosts.tab); then \
79: echo "there is a defined link; assume okay"; \
80: else echo "**** ERROR **** hosts.tab not defined!" && \
81: echo -n "You need to do one of the following within your " && \
1.92 harris41 82: echo "CVS repository (cd loncapa/loncom)" && \
83: echo " 1) ln -s production_hosts.tab hosts.tab" && \
84: echo " 2) ln -s development_hosts.tab hosts.tab" && \
85: echo "or 3) ln -s rawhide_hosts.tab hosts.tab" && \
1.63 harris41 86: echo "(you most likely want option #1, production_hosts.tab)" && \
87: exit 1; \
88: fi
1.64 harris41 89:
1.66 harris41 90: NET_hosts_tab:
91: make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
92: MTARGET="hosts_tab" HOSTNAME="$(HOSTNAME)" lpmladm
93:
1.64 harris41 94: hosts_tab: TEST_hosts_tab
1.80 harris41 95: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
96: perl xfml_parse.pl $(SOURCE)/doc/loncapafiles/valid_hosts.xfml | \
1.64 harris41 97: perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
98: "$(TARGET)" > Makefile.install
1.66 harris41 99: make -f Makefile.install directories
1.64 harris41 100: make -f Makefile.install files
101: @echo "If hosts.tab has changed, restart httpd and loncontrol:"
102: @echo " /etc/rc.d/init.d/httpd restart"
103: @echo " /etc/rc.d/init.d/loncontrol restart"
104:
1.66 harris41 105: lpmladm:
106: @if (test $(METAMTARGET) = "TRANSPORT"); then \
107: echo "Transporting to $(HOSTNAME)"; \
108: sudo make DIST=$(DIST) CATEGORY=$(CATEGORY) \
109: SOURCE="$(SOURCE)" \
110: TARGET="lpmladm.$(TIMESTAMP)" \
111: NORESTORECONF="$(NORESTORECONF)" "$(MTARGET)"; \
112: cd lpmladm.$(TIMESTAMP); \
113: sudo tar czvf ../tarball$(TIMESTAMP).tar.gz .; \
114: cd ..; scp tarball$(TIMESTAMP).tar.gz \
115: lpmladm@$(HOSTNAME):~/tarball$(TIMESTAMP).tar.gz; \
116: ssh lpmladm@$(HOSTNAME) sudo mv tarball$(TIMESTAMP).tar.gz /; \
117: ssh lpmladm@$(HOSTNAME) sudo tar -x -z -v -C / \
118: -p --same-owner -f \
119: /tarball$(TIMESTAMP).tar.gz; \
120: ssh lpmladm@$(HOSTNAME) sudo rm -f \
121: /tarball$(TIMESTAMP).tar.gz; \
122: elif (test $(METAMTARGET) = "LAUNCH"); then \
123: echo "Launching process on $(HOSTNAME)"; \
124: LAUNCHSAVE=$(OUTSTREAM) $(SAVE); \
125: make DIST=$(DIST) CATEGORY=$(CATEGORY) SOURCE="$(SOURCE)" \
126: TARGET="$(TARGET)" NORESTORECONF="$(NORESTORECONF)" \
127: LAUNCH="$(LAUNCHSAVE)" "$(MTARGET)"; \
128: scp $(SAVE) lpmladm@$(HOSTNAME):~/$(SAVE); \
129: ssh lpmladm@$(HOSTNAME) sudo perl $(SAVE); \
130: ssh lpmladm@$(HOSTNAME) sudo rm -f $(SAVE); \
131: else \
132: echo "**** ERROR **** Incorrect METAMTARGET"; \
133: fi
134:
1.3 harris41 135: HTML:
136: install -d HTML
1.80 harris41 137: cp $(SOURCE)/doc/loncapafiles/*.gif HTML
138: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
139: perl lpml_parse.pl html development default "$(SOURCE)" '$(TARGET)' \
140: > HTML/index.html
1.3 harris41 141:
1.8 harris41 142: status:
1.7 harris41 143: install -d HTML
1.80 harris41 144: cp $(SOURCE)/doc/loncapafiles/*.gif HTML
145: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
146: perl lpml_parse.pl html $(CATEGORY) $(DIST) "$(SOURCE)" "($TARGET)" | \
1.49 harris41 147: perl lpml_html_posteval.pl > \
1.39 harris41 148: HTML/filestatus.html
1.48 harris41 149:
1.22 harris41 150: statuspost: status
1.80 harris41 151: cp $(SOURCE)/doc/loncapafiles/*.gif \
152: $(TARGET)/home/httpd/html/lon-status
1.52 harris41 153: cp HTML/filestatus.html \
154: $(TARGET)/home/httpd/html/lon-status/filestatus.html
1.22 harris41 155:
1.33 harris41 156: rpmstatus:
157: install -d RPMSTATUS
1.52 harris41 158: rpm -qa --queryformat \
159: '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > \
160: RPMSTATUS/current.tmp
1.80 harris41 161: cat $(SOURCE)/doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
162: cat $(SOURCE)/doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
1.52 harris41 163: perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp \
164: RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
1.33 harris41 165:
166: rpmstatuspost: rpmstatus
167: cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
168:
1.37 albertel 169: configinstall: Makefile.configinstall
1.55 harris41 170: make -f Makefile.configinstall SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
171: configfiles
172: if (test "0" = $(NORESTORECONF)); then \
173: perl loncaparestoreconfigurations suffix .lpmlnew; fi
1.9 harris41 174:
1.80 harris41 175: Makefile.configinstall: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
176: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.55 harris41 177: perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "$(SOURCE)" \
178: "$(TARGET)" > Makefile.configinstall
1.37 albertel 179:
1.45 harris41 180: warningnote:
181: @if (test -s WARNINGS); then \
182: W=`grep -c '\*\*\*\* WARNING' WARNINGS`; \
183: E=`grep -c '\*\*\*\* ERROR' WARNINGS`; \
184: N=`grep -c '\*\*\*\* NOTE' WARNINGS`; \
185: echo "---> $$W WARNINGS ENCOUNTERED! "; \
186: echo "---> $$E ERRORS ENCOUNTERED! "; \
187: echo "---> $$N NOTES ENCOUNTERED! "; \
188: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
189: echo "!!!! Please read the WARNINGS file !!!!"; \
190: echo "!!!! to make sure everything is !!!!"; \
191: echo "!!!! correct and taken care of !!!!"; \
192: echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
193: fi
1.65 harris41 194:
1.66 harris41 195: NET_webserverconf:
196: make TIMESTAMP=`date +"%s"` METAMTARGET="LAUNCH" \
197: MTARGET="webserverconf" HOSTNAME="$(HOSTNAME)" lpmladm
198:
1.65 harris41 199: webserverconf:
1.80 harris41 200: cat $(SOURCE)/doc/loncapafiles/webserver.piml | \
1.66 harris41 201: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH)
1.65 harris41 202:
1.75 harris41 203: sanitycheck:
1.80 harris41 204: cat $(SOURCE)/doc/loncapafiles/sanitycheck.piml | \
1.98 harris41 205: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
206: tee -a WARNINGS
207:
208: updatequery:
209: cat $(SOURCE)/doc/loncapafiles/updatequery.piml | \
1.111 harris41 210: perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(QUERYLAUNCH)
1.75 harris41 211:
1.65 harris41 212: postinstall:
213: make webserverconf
1.75 harris41 214: make sanitycheck
1.117 harris41 215:
216: NET_rawinstall:
217: make TIMESTAMP=`date +"%s"` METAMTARGET="TRANSPORT" \
218: MTARGET="rawinstall" HOSTNAME="$(HOSTNAME)" lpmladm
1.45 harris41 219:
1.63 harris41 220: install: TEST_hosts_tab Makefile.install Makefile
1.46 harris41 221: echo -n "" > WARNINGS
1.52 harris41 222: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
223: directories
1.51 harris41 224: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
225: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
1.55 harris41 226: make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
227: NORESTORECONF="$(NORESTORECONF)" configinstall
1.72 harris41 228: make postinstall
1.45 harris41 229: make warningnote
1.76 harris41 230: echo "You can run 'make test' to see if your system is ready to go!"
1.116 harris41 231: echo "NOTE THAT YOUR SYSTEM MUST HAVE MYSQL WITH A USER=\"www\" AND"
232: echo -n "PASSWORD=\"localhostkey\" FOR www\@localhost"
233: echo -n "(YOU MAY NEED TO REINITIALIZE YOUR MYSQL www\@localhost USER)"
234: echo -n "Please see http://install.lon-capa.org/ for more information"
1.4 harris41 235:
1.113 harris41 236: rawinstall: Makefile.install Makefile
237: echo -n "" > WARNINGS
238: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
239: directories
240: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
241: make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
242: make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
243: NORESTORECONF="$(NORESTORECONF)" configinstall
244:
1.115 harris41 245: Makefile.install: alwaysrun
1.80 harris41 246: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.52 harris41 247: perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
248: "$(TARGET)" > Makefile.install
1.37 albertel 249:
1.50 harris41 250: build: Makefile.build pod2html.sh pod2man.sh
1.91 harris41 251: install -d $(SOURCE)/doc/man
252: install -d $(SOURCE)/doc/scripts
253: install -d $(SOURCE)/doc/lib/perl/Apache
1.46 harris41 254: echo -n "" > WARNINGS
1.37 albertel 255: make -f Makefile.build all
1.45 harris41 256: make warningnote
1.37 albertel 257:
1.80 harris41 258: Makefile.build: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
259: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.78 harris41 260: perl lpml_parse.pl build $(CATEGORY) $(DIST) "$(SOURCE)" "$(TARGET)" \
261: > Makefile.build
1.8 harris41 262:
1.55 harris41 263: RPM: BinaryRoot base_rpm_file_list
1.80 harris41 264: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.63 harris41 265: perl lpml_parse.pl make_rpm $(CATEGORY) $(DIST) $(SOURCE) $(TARGET) \
266: > base_customizerpm.xml
1.55 harris41 267: cat base_rpm_file_list.txt | perl make_rpm.pl base 3.2 '' '' \
268: BinaryRoot base_customizerpm.xml
269:
1.59 harris41 270: setup_RPM:
1.55 harris41 271: echo "SetupBinaryRoot/etc/passwd" > setup_rpm_file_list.txt
272: echo "SetupBinaryRoot/etc/group" >> setup_rpm_file_list.txt
273: echo "SetupBinaryRoot/etc/hosts.deny" >> setup_rpm_file_list.txt
274: echo "SetupBinaryRoot/home/www" >> setup_rpm_file_list.txt
275: echo "SetupBinaryRoot/etc/pam.d/passwd" >> setup_rpm_file_list.txt
276: echo "SetupBinaryRoot/etc/pam.d/login" >> setup_rpm_file_list.txt
277: perl setup_rpm_binaryroot.pl
278: cat setup_rpm_file_list.txt | perl make_rpm.pl setup 3.2 '' '' \
279: SetupBinaryRoot customizerpm.xml
1.60 harris41 280:
281: DPKG:
1.82 harris41 282: make TARGET='lon-capa-$(VERSION)' NORESTORECONF='1' install
1.60 harris41 283: @echo "You will next need to follow instructions at:"
284: @echo "http://people.debian.org/~jaldhar/make_package1.html"
285: @echo "A directory with a snapshot of the debian package files"
286: @echo "is LON-CAPA-base."
1.82 harris41 287: # What DPKG steps need to happen (for future implementation):
288: # export EMAIL="" ... probably sharrison@mail.lon-capa.org
289: # deb-make
290: # edit debian/control
291: # make debian/dirs file
292: # make debian/copyright file
293: # debian/README.debian... point them to LON-CAPA URLS
294: # debian/changelog
295: # debian/conffiles
296: # debuild
297: # and maybe do some GPG-related steps around here
1.55 harris41 298:
299: base_rpm_file_list:
1.80 harris41 300: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.55 harris41 301: perl lpml_parse.pl rpm_file_list $(CATEGORY) $(DIST) $(SOURCE) \
302: 'BinaryRoot' | sort > base_rpm_file_list.txt
1.6 harris41 303:
1.55 harris41 304: BinaryRoot: base_rpm_file_list
305: make TARGET='BinaryRoot' NORESTORECONF='1' install
1.23 harris41 306:
1.62 harris41 307: # Generates CVS:loncom/build/docs; root location of install.lon-capa.org
308: doc:
309: install -d docs
1.99 harris41 310: @if (test -e installation_manual.pdf); then \
311: cp -vf installation_manual.pdf docs/.; \
312: else \
313: touch docs/installation_manual.pdf; \
314: fi
1.62 harris41 315: install -m 0755 -d docs/icons
1.80 harris41 316: install -m 0644 $(SOURCE)/doc/icons/[^C][^V]* docs/icons
1.62 harris41 317: install -m 0755 -d docs/reconfig
1.99 harris41 318: cd docs; ln -fs installation_manual.pdf index.pdf
319: cd docs/reconfig; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 320: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
321: $(SOURCE)/doc/build/reconfig.html > docs/reconfig/index.html
1.62 harris41 322: install -m 0755 -d docs/reconfig/confexamples
1.80 harris41 323: install -m 0644 $(SOURCE)/doc/build/confexamples/[^C][^V]* \
1.62 harris41 324: docs/reconfig/confexamples
1.80 harris41 325: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
326: $(SOURCE)/doc/build/installindex.html > docs/index.html
1.67 harris41 327: install -m 0755 -d docs/license
1.99 harris41 328: cd docs/license; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 329: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
330: $(SOURCE)/doc/build/license.html > docs/license/index.html
1.67 harris41 331: install -m 0755 -d docs/contact
1.99 harris41 332: cd docs/contact; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 333: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
334: $(SOURCE)/doc/build/contact.html > docs/contact/index.html
1.68 harris41 335: install -m 0755 -d docs/faq
1.99 harris41 336: cd docs/faq; ln -fs ../installation_manual.pdf index.pdf
1.80 harris41 337: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
338: $(SOURCE)/doc/build/faq.html > docs/faq/index.html
1.69 harris41 339: install -m 0755 -d docs/downloads
1.99 harris41 340: cd docs/downloads; ln -fs ../installation_manual.pdf download.pdf
1.80 harris41 341: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
342: $(SOURCE)/doc/build/download.html > docs/downloads/index.html
1.69 harris41 343: install -m 0755 -d docs/install
1.99 harris41 344: cd docs/install; ln -fs ../installation_manual.pdf install.pdf
1.80 harris41 345: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
346: $(SOURCE)/doc/build/install.html > docs/install/index.html
1.69 harris41 347: install -m 0755 -d docs/upgrade
1.99 harris41 348: cd docs/upgrade; ln -fs ../installation_manual.pdf upgrade.pdf
1.80 harris41 349: perl doc_template.pl $(SOURCE)/doc/templates/template.html \
350: $(SOURCE)/doc/build/upgrade.html > docs/upgrade/index.html
1.62 harris41 351: cd docs; tar czvpf ../docs.tar.gz .
352:
1.99 harris41 353: pdfdoc: TEST_html2ps
354: install -d pdfdoc
355: /usr/local/html2ps/bin/html2ps -D \
356: $(SOURCE)/doc/build/installindex_noform.html > pdfdoc/installindex.ps
357: /usr/local/html2ps/bin/html2ps -D \
358: $(SOURCE)/doc/build/reconfig.html | \
359: perl -nle 's/\[EXAMPLE\]/\[EXAMPLE \(at end of document\)\]/g;print' \
360: > pdfdoc/reconfig.ps
361: /usr/local/html2ps/bin/html2ps -D \
362: $(SOURCE)/doc/build/install.html > pdfdoc/install.ps
363: /usr/local/html2ps/bin/html2ps -D \
364: $(SOURCE)/doc/build/upgrade.html > pdfdoc/upgrade.ps
365: /usr/local/html2ps/bin/html2ps -D \
366: $(SOURCE)/doc/build/faq.html > pdfdoc/faq.ps
367: /usr/local/html2ps/bin/html2ps -D \
368: $(SOURCE)/doc/build/download.html > pdfdoc/download.ps
369: /usr/local/html2ps/bin/html2ps -D \
370: $(SOURCE)/doc/build/contact.html > pdfdoc/contact.ps
371: /usr/local/html2ps/bin/html2ps -D \
372: $(SOURCE)/doc/build/license.html > pdfdoc/license.ps
373: # This creates a bad confexamples.ps... so take the long way around
374: # cd $(SOURCE)/doc/build/confexamples; \
375: # mpage -P- -1 -H [^C]* > ../../../loncom/build/pdfdoc/confexamples.ps
376: install -d pdfdoc/confexamples
377: cd $(SOURCE)/doc/build/confexamples; \
378: find . -type f | cut -b3- | grep -v '^C' | perl -nle \
379: '`mpage -P- -1 -H $$_ > ../../../loncom/build/pdfdoc/confexamples/$$_.ps`;'
380: echo '' > pdfdoc/contents.txt
381: echo '' >> pdfdoc/contents.txt
382: echo ' The Learning Online Network' >> pdfdoc/contents.txt
383: echo ' with the' >> pdfdoc/contents.txt
384: echo ' Computer-Assisted Personalized Approach' >> \
385: pdfdoc/contents.txt
386: echo '' >> pdfdoc/contents.txt
387: echo '' >> pdfdoc/contents.txt
388: echo 'CONTENTS' >> pdfdoc/contents.txt
389: echo '--------' >> pdfdoc/contents.txt
390: echo 'Opening' >> pdfdoc/contents.txt
391: echo 'Configuration' >> pdfdoc/contents.txt
392: echo 'Installation' >> pdfdoc/contents.txt
393: echo 'Upgrading a LON-CAPA Server' >> pdfdoc/contents.txt
394: echo 'FAQ' >> pdfdoc/contents.txt
395: echo 'Download' >> pdfdoc/contents.txt
396: echo 'Contact Information' >> pdfdoc/contents.txt
397: echo 'License Information' >> pdfdoc/contents.txt
398: echo 'Configuration Examples' >> pdfdoc/contents.txt
399: mpage -P- -1 \
400: pdfdoc/contents.txt \
401: pdfdoc/installindex.ps \
402: pdfdoc/reconfig.ps \
403: pdfdoc/install.ps \
404: pdfdoc/upgrade.ps \
405: pdfdoc/faq.ps \
406: pdfdoc/download.ps \
407: pdfdoc/contact.ps \
408: pdfdoc/license.ps \
409: pdfdoc/confexamples/*.ps \
410: > pdfdoc/installation_manual.ps
411: ps2pdf pdfdoc/installation_manual.ps pdfdoc/installation_manual.pdf
412: mv -vf pdfdoc/installation_manual.pdf .
413:
414: TEST_html2ps:
415: @if (test -e /usr/local/html2ps/bin/html2ps); then \
416: echo "I can find html2ps; assume okay"; \
417: else \
418: echo "**** ERROR **** cannot find /usr/local/html2ps/bin/html2ps!" && \
419: echo "Please visit http://www.tdb.uu.se/~jan/html2ps.html" && \
420: exit 1; \
421: fi
422:
1.80 harris41 423: tardist:
1.104 harris41 424: # ----------- MANIFEST the building, testing and standard loncapa files
1.87 harris41 425: cat $(SOURCE)/doc/loncapafiles/buildfiles.lpml | \
426: perl lpml_parse.pl MANIFEST development default \
1.88 harris41 427: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' > $(SOURCE)/MANIFEST
1.94 harris41 428: cat $(SOURCE)/doc/loncapafiles/testfiles.lpml | \
429: perl lpml_parse.pl MANIFEST development default \
430: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
1.95 harris41 431: cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
1.80 harris41 432: perl lpml_parse.pl MANIFEST development default \
1.88 harris41 433: '$(SOURCE)' '$(TARGET)' | grep '[[:alnum:]]' >> $(SOURCE)/MANIFEST
1.104 harris41 434: # ------ CVS/Entries directories to retain 'time-checking' intelligence
1.90 harris41 435: cd $(SOURCE); find . -type f -name 'Entries' | grep 'CVS/Entries' >> \
436: MANIFEST
1.104 harris41 437: # ---- Files for top-level (the vanilla layer that the user first sees)
1.80 harris41 438: echo 'README' >> $(SOURCE)/MANIFEST
439: echo 'UPDATE' >> $(SOURCE)/MANIFEST
440: echo 'TEST' >> $(SOURCE)/MANIFEST
1.93 harris41 441: echo 'CHECKRPMS' >> $(SOURCE)/MANIFEST
1.105 harris41 442: # ---------------------------------- might as well include the MANIFEST
1.86 harris41 443: echo 'MANIFEST' >> $(SOURCE)/MANIFEST
1.104 harris41 444: # ------------------------------------------ hosts.tab are belong to us
1.89 harris41 445: echo 'loncom/rawhide_hosts.tab' >> $(SOURCE)/MANIFEST
446: echo 'loncom/production_hosts.tab' >> $(SOURCE)/MANIFEST
447: echo 'loncom/development_hosts.tab' >> $(SOURCE)/MANIFEST
1.104 harris41 448: # ------------------ Files needed for dynamically generated directories
1.83 harris41 449: echo 'doc/man' >> $(SOURCE)/MANIFEST
450: echo 'doc/lib' >> $(SOURCE)/MANIFEST
451: echo 'doc/lib/perl' >> $(SOURCE)/MANIFEST
1.85 harris41 452: echo 'doc/lib/perl/Apache' >> $(SOURCE)/MANIFEST
1.84 harris41 453: echo 'doc/scripts' >> $(SOURCE)/MANIFEST
1.104 harris41 454: # --------------------------- Point UPDATE to the internal make process
1.80 harris41 455: echo '#!/bin/sh' > $(SOURCE)/UPDATE
1.105 harris41 456: echo 'touch loncom/build/WARNINGS' >> $(SOURCE)/UPDATE;
457: echo 'ln -s loncom/build/WARNINGS WARNINGS' >> $(SOURCE)/UPDATE;
1.110 harris41 458: echo 'cd loncom/build; make build' >> $(SOURCE)/UPDATE
1.113 harris41 459: echo 'make rawinstall' >> $(SOURCE)/UPDATE
1.118 harris41 460: echo 'make configinstall' >> $(SOURCE)/UPDATE
1.108 harris41 461: echo 'make updatequery' >> $(SOURCE)/UPDATE
1.109 harris41 462: echo 'make hosts_tab' >> $(SOURCE)/UPDATE
1.113 harris41 463: echo 'make postinstall' >> $(SOURCE)/UPDATE
464: echo 'make warningnote' >> $(SOURCE)/UPDATE
1.104 harris41 465: # ----------------------------- Point TEST to the internal make process
1.81 harris41 466: echo '#!/bin/sh' > $(SOURCE)/TEST
1.80 harris41 467: echo 'cd loncom/build; make test' >> $(SOURCE)/TEST
1.104 harris41 468: # ----------------------------- Copy CHECKRPMS to the vanilla top-level
1.93 harris41 469: cp $(SOURCE)/loncom/build/CHECKRPMS $(SOURCE)/CHECKRPMS
1.104 harris41 470: # ----------------------- vanilla executables must indeed be executable
1.80 harris41 471: chmod a+rx $(SOURCE)/UPDATE
472: chmod a+rx $(SOURCE)/TEST
1.93 harris41 473: chmod a+rx $(SOURCE)/CHECKRPMS
1.104 harris41 474: # -------------------------------- Copy README to the vanilla top-level
1.80 harris41 475: cp $(SOURCE)/doc/shortest_path_redhat7.2.txt $(SOURCE)/README
1.104 harris41 476: # --------------------------------------------------- Clean up MANIFEST
1.80 harris41 477: cd $(SOURCE); \
1.103 harris41 478: sort MANIFEST | perl -nle 'print "$(DIRTARGET)/$$_"' | \
1.104 harris41 479: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
480: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
481: perl -nle 's/\w+\/\.\.\///g;s/\w+\/\.\.\///g;print' | \
482: perl -nle 's/\/\.\//\//g;print' | sort | uniq > \
483: MANIFEST_loncapa
484: # -------------------------------------------------------- Make tardist
485: @cd $(SOURCE); \
486: if (test -h $(DIRTARGET)); then \
487: echo "$(DIRTARGET) link already defined; assume okay"; \
488: else \
489: ln -s . $(DIRTARGET); \
490: fi
1.105 harris41 491: cd $(SOURCE); \
1.100 harris41 492: tar --no-recursion --numeric-owner --files-from MANIFEST_loncapa \
1.102 harris41 493: -h -czf loncapa.tar.gz 2>WARNINGS || [ "0" == "0" ]
1.80 harris41 494: cat $(SOURCE)/WARNINGS | \
495: xargs --replace=XXX echo '**** WARNING **** XXX' > WARNINGS
496: rm -f $(SOURCE)/WARNINGS
497: make warningnote
1.52 harris41 498:
1.1 harris41 499: clean:
1.112 harris41 500: rm -Rf HTML
501: rm -f installation_manual.pdf
502: rm -f Makefile.build
503: rm -f Makefile.install
504: rm -f Makefile.configinstall
505: rm -Rf BinaryRoot
506: rm -Rf SetupBinaryRoot
507: rm -Rf LON-CAPA-base
508: rm -f base_rpm_file_list.txt
509: rm -f base_customizerpm.xml
510: rm -f setup_rpm_file_list.txt
511: rm -f docs.tar.gz
512: rm -Rf docs
513: rm -Rf pdfdoc
514: rm -f program.pl*
515: rm -Rf lpmladm.*
516: rm -f WARNINGS
1.114 harris41 517: rm -f $(SOURCE)/loncom/build/hosts.tab
1.112 harris41 518:
519: reallyclean:
1.80 harris41 520: rm -f $(SOURCE)/README
521: rm -f $(SOURCE)/UPDATE
522: rm -f $(SOURCE)/TEST
1.105 harris41 523: rm -f $(SOURCE)/MANIFEST
524: rm -f $(SOURCE)/loncapa
1.114 harris41 525: rm -f $(SOURCE)/loncom/build/hosts.tab
1.80 harris41 526: rm -f $(SOURCE)/loncapa.tar.gz
1.3 harris41 527: rm -Rf HTML
1.99 harris41 528: rm -f installation_manual.pdf
1.8 harris41 529: rm -f Makefile.build
530: rm -f Makefile.install
1.57 harris41 531: rm -f Makefile.configinstall
1.55 harris41 532: rm -Rf BinaryRoot
533: rm -Rf SetupBinaryRoot
1.62 harris41 534: rm -Rf LON-CAPA-base
1.56 harris41 535: rm -f base_rpm_file_list.txt
1.58 harris41 536: rm -f base_customizerpm.xml
1.56 harris41 537: rm -f setup_rpm_file_list.txt
1.62 harris41 538: rm -f docs.tar.gz
539: rm -Rf docs
1.99 harris41 540: rm -Rf pdfdoc
1.66 harris41 541: rm -f program.pl*
542: rm -Rf lpmladm.*
1.67 harris41 543: make -f Makefile.cvs clean
1.80 harris41 544: rm -f WARNINGS
1.115 harris41 545:
546: alwaysrun:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>