Annotation of loncom/build/Makefile, revision 1.52

1.48      harris41    1: # The LearningOnline Network with CAPA
                      2: 
1.1       harris41    3: # Scott Harrison
1.52    ! harris41    4: # $Id: Makefile,v 1.51 2001/12/29 18:52:08 harris41 Exp $
1.1       harris41    5: 
1.38      harris41    6: DIST="default"
1.39      harris41    7: CATEGORY="development"
1.51      harris41    8: SOURCE="../.."
                      9: TARGET=""
1.12      harris41   10: 
1.9       harris41   11: all: 
1.52    ! harris41   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 "(option) DIST can be redhat7.1, debian, redhat6.2, or default"
        !            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 "status: compare the TARGET filesystem with a compiled CVS "
        !            34: 	@echo "        source directory"
        !            35: 	@echo "statuspost: post the results of "make status" to "
        !            36: 	@echo "            TARGET/home/httpd/html/lon-status/filestatus.html"
        !            37: 	@echo "rpmstatus: compare the rpms on a system to defined lists "
        !            38: 	@echo "           CVS:doc/otherfiles/cd_rpms and "
        !            39: 	@echo "           CVS:doc/otherfiles/rpm_list.txt"
        !            40: 	@echo "rpmstatuspost: post the results of "make rpmstatus" to "
        !            41: 	@echo "            TARGET/home/httpd/html/lon-status/rpmstatus.html"
        !            42: 	@echo "cvsreport: look at the latest changes over the last week"
1.1       harris41   43: 
1.52    ! harris41   44: test: TEST_lpml_scripts TEST_system_dependencies TEST_web_layer
1.41      harris41   45: 	@echo "ALL SYSTEM DEPENDENCY TESTS SUCCESSFUL"
                     46: 
                     47: TEST_system_dependencies:
1.52    ! harris41   48: 	@echo "TESTING SYSTEM DEPENDENCIES"
1.41      harris41   49: 	cd system_dependencies; make
1.44      harris41   50: 
                     51: TEST_lpml_scripts:
1.52    ! harris41   52: 	@echo "TESTING LPML INSTALLATION CODE"
1.44      harris41   53: 	cd ../test; perl filecomparetest.pl
1.41      harris41   54: 
1.52    ! harris41   55: TEST_web_layer:
        !            56: 	@echo "Testing of web layers is not yet implemented."
1.2       harris41   57: 
1.3       harris41   58: HTML:
                     59: 	install -d HTML
                     60: 	cp ../../doc/loncapafiles/*.gif HTML
1.52    ! harris41   61: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > \
        !            62: 	HTML/index.html
1.3       harris41   63: 
1.8       harris41   64: status:
1.7       harris41   65: 	install -d HTML
                     66: 	cp ../../doc/loncapafiles/*.gif HTML
1.39      harris41   67: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
1.49      harris41   68: 	perl lpml_parse.pl html $(CATEGORY) $(DIST) "../.." "" | \
                     69: 	perl lpml_html_posteval.pl > \
1.39      harris41   70: 	HTML/filestatus.html
1.48      harris41   71: 
1.22      harris41   72: statuspost: status
1.52    ! harris41   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
1.22      harris41   76: 
1.33      harris41   77: rpmstatus:
                     78: 	install -d RPMSTATUS
1.52    ! harris41   79: 	rpm -qa --queryformat \
        !            80: 	'%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | sort > \
        !            81: 	RPMSTATUS/current.tmp
1.34      harris41   82: 	cat ../../doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
1.36      harris41   83: 	cat ../../doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
1.52    ! harris41   84: 	perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp \
        !            85: 	RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
1.33      harris41   86: 
                     87: rpmstatuspost: rpmstatus
                     88: 	cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
                     89: 
1.37      albertel   90: configinstall: Makefile.configinstall
1.10      harris41   91: 	make -f Makefile.configinstall SOURCE="../.." TARGET="" configfiles
1.47      harris41   92: 	perl loncaparestoreconfigurations suffix .lpmlnew
1.9       harris41   93: 
1.40      harris41   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
1.37      albertel   98: 
1.45      harris41   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: 
1.51      harris41  116: install: Makefile.install Makefile
1.46      harris41  117: 	echo -n "" > WARNINGS
1.52    ! harris41  118: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
        !           119: 	directories
1.51      harris41  120: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
                    121: 	make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
1.40      harris41  122: 	make configinstall
1.45      harris41  123: 	make warningnote
1.4       harris41  124: 
1.38      harris41  125: Makefile.install: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
                    126: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
1.52    ! harris41  127: 	perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
        !           128: 	"$(TARGET)" > Makefile.install
1.37      albertel  129: 
1.50      harris41  130: build: Makefile.build pod2html.sh pod2man.sh
1.46      harris41  131: 	echo -n "" > WARNINGS
1.37      albertel  132: 	make -f Makefile.build all
1.45      harris41  133: 	make warningnote
1.37      albertel  134: 
1.39      harris41  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
1.8       harris41  139: 
1.6       harris41  140: RPM: BinaryRoot
                    141: 	cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
1.20      harris41  142: 	cat setup_file_list.txt | perl make_rpm.pl setup 3.1 '' '' BinaryRoot
1.6       harris41  143: 
                    144: BinaryRoot:
1.5       harris41  145: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
                    146: 
1.23      harris41  147: loncapaconfig:
                    148: 	rm -Rf LoncapaconfigRoot
                    149: 	install -d LoncapaconfigRoot/usr/src/
1.24      harris41  150: 	install -d LoncapaconfigRoot/usr/lib/python1.5/site-packages
1.52    ! harris41  151: 	install /usr/lib/python1.5/site-packages/kudzumodule.so \
        !           152: 	LoncapaconfigRoot/usr/lib/python1.5/site-packages/kudzumodule.so
1.23      harris41  153: 	cd LoncapaconfigRoot/usr/src; cp -pR /mnt/drive/loncapaconfig .
                    154: 	install -d LoncapaconfigRoot/usr/sbin
1.52    ! harris41  155: 	@echo -e "#!/bin/sh\ncd /usr/src/loncapaconfig/usr/bin; \
        !           156: 	./loncapaconfig\n" > LoncapaconfigRoot/usr/sbin/loncapaconfig
1.23      harris41  157: 	chmod u+x LoncapaconfigRoot/usr/sbin/loncapaconfig
1.24      harris41  158: 	find LoncapaconfigRoot -type d | xargs chmod o-wxr
                    159: 	find LoncapaconfigRoot -type f | xargs chmod o-wxr
1.52    ! harris41  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
1.24      harris41  165: 	find LoncapaconfigRoot/ -type f >> loncapaconfig_file_list.txt
1.52    ! harris41  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/.
1.23      harris41  170: 
1.31      harris41  171: install.lon-capa.org: cvsreport
1.26      harris41  172: 	install -d docs
1.31      harris41  173: 	install ../../doc/build/cvsreport.html docs/cvsreport.html
1.26      harris41  174: 	install ../../doc/build/doc.html docs/index.html
                    175: 	install -d docs/hardware
1.27      harris41  176: 	install ../../doc/hardware/hardware.html docs/hardware/hardware.html
1.26      harris41  177: 	install -d docs/3.1
                    178: 	install ../../doc/build/install.html docs/3.1/index.html
1.52    ! harris41  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
1.35      harris41  185: 	install -d docs/cvsupgrade
                    186: 	install ../../doc/build/cvsupgrade.html docs/cvsupgrade/index.html
1.26      harris41  187: 	install -d docs/upgrade
1.35      harris41  188: 	install ../../doc/build/upgrade.html docs/upgrade/index.html
1.26      harris41  189: 	install -d docs/reconfig
                    190: 	install ../../doc/build/reconfig.html docs/reconfig/index.html
1.27      harris41  191: 	install -d docs/3.1/otherfiles
1.52    ! harris41  192: 	install ../../doc/otherfiles/rpm_list.txt \
        !           193: 	docs/3.1/otherfiles/rpm_list.txt
1.27      harris41  194: 	install ../../doc/build/loncapanetwork.html docs/loncapanetwork.html
                    195: 	install ../../doc/build/loncapanfs.html docs/loncapanfs.html
1.52    ! harris41  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
1.28      harris41  204: 	install ../../doc/build/loncapatimesync.html docs/loncapatimesync.html
1.52    ! harris41  205: 	install ../../doc/build/loncapamathequivalency.html \
        !           206: 	docs/loncapamathequivalency.html
1.27      harris41  207: 	tar czvf install.lon-capa.org_docs.tar.gz docs
                    208: 	rm -Rf docs
1.26      harris41  209: 
1.30      harris41  210: cvsreport:
1.52    ! harris41  211: 	# Header
        !           212: 	echo "<H1>Automatically generated CVS report</H1>" > \
        !           213: 	../../doc/build/cvsreport.html
        !           214: 	# General Date Info
        !           215: 	echo "<H1>LON-CAPA Software Changes from `date --date='7 days ago' \
        !           216: 	+\"%Y-%m-%d\"` to `date +\"%Y-%m-%d\"`</H1>" >> \
        !           217: 	../../doc/build/cvsreport.html
        !           218: 	# General Alteration Info
1.31      harris41  219: 	echo "<P>Number of altered files:" >> ../../doc/build/cvsreport.html
1.52    ! harris41  220: 	cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" \
        !           221: 	loncom CAPA doc packaging 2>/dev/null | perl \
        !           222: 	loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- | \
        !           223: 	wc -l >> doc/build/cvsreport.html
        !           224: 	# Listing of Altered Files
        !           225: 	echo "</P><P>Altered files:</P><P><PRE>" >> \
        !           226: 	../../doc/build/cvsreport.html
        !           227: 	cd ../..; cvs log -d ">`date --date='8 days ago' +\"%Y-%m-%d\"`" \
        !           228: 	loncom CAPA doc packaging 2>/dev/null | \
        !           229: 	perl loncom/build/cvsfilter.pl | grep '^Working file:' | cut -b15- \
        !           230: 	>> doc/build/cvsreport.html
        !           231: 	# Log entries for loncom
        !           232: 	echo "</PRE></P><P>Log entries for <B>loncom</B>:</P><PRE>" >> \
        !           233: 	../../doc/build/cvsreport.html
        !           234: 	cd ../../loncom; cvs log -d ">`date --date='8 days ago' \
        !           235: 	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
        !           236: 	../doc/build/cvsreport.html
        !           237: 	# Log entries for CAPA
        !           238: 	echo "</PRE></P><P>Log entries for <B>CAPA</B>:</P><PRE>" >> \
        !           239: 	../../doc/build/cvsreport.html
        !           240: 	cd ../../CAPA; cvs log -d ">`date --date='8 days ago' \
        !           241: 	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
        !           242: 	../doc/build/cvsreport.html
        !           243: 	# Log entries for doc
        !           244: 	echo "</PRE></P><P>Log entries for <B>doc</B>:</P><PRE>" >> \
        !           245: 	../../doc/build/cvsreport.html
        !           246: 	cd ../../doc; cvs log -d ">`date --date='8 days ago' \
        !           247: 	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
        !           248: 	../doc/build/cvsreport.html
        !           249: 	# Log entries for packaging
        !           250: 	echo "</PRE></P><P>Log entries for <B>packaging</B>:</P><PRE>" >> \
        !           251: 	../../doc/build/cvsreport.html
        !           252: 	cd ../../packaging; cvs log -d ">`date --date='8 days ago' \
        !           253: 	+\"%Y-%m-%d\"`" . 2>/dev/null | perl ../loncom/build/cvsfilter.pl >> \
        !           254: 	../doc/build/cvsreport.html
1.31      harris41  255: 	echo "</PRE></P>" >> ../../doc/build/cvsreport.html
1.52    ! harris41  256: 
1.1       harris41  257: clean:
1.3       harris41  258: 	rm -Rf HTML
1.8       harris41  259: 	rm -f Makefile.build
                    260: 	rm -f Makefile.install

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>