File:  [LON-CAPA] / loncom / build / Makefile
Revision 1.53: download - view: text, annotated - select for diffs
Sun Jan 6 04:32:39 2002 UTC (22 years, 6 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
removing redundant line and fixing a target name to be more sensible

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

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