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