File:  [LON-CAPA] / loncom / build / Makefile
Revision 1.40: download - view: text, annotated - select for diffs
Tue Sep 18 13:18:14 2001 UTC (22 years, 9 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
using lpml_parse.pl for build,install, and configinstall
now

    1: # Makefile
    2: # For LON-CAPA
    3: # Scott Harrison
    4: # November 2000
    5: 
    6: CDTARGET="."
    7: CDFSLOC="/mnt/loncapacd/install.lon-capa.org/3.1/currentcdsource"
    8: DIST="default"
    9: CATEGORY="development"
   10: 
   11: all: 
   12: 	# nothing yet here
   13: 
   14: cd: 
   15: 	# Build temporary script to get cd
   16: 	# make sure there is enough disk space
   17: 	@echo "# Automatically generated Makefile for LON-CAPA" > Makefile.cd.tmp
   18: 	@/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
   19: 	@echo "cd:" >> Makefile.cd.tmp
   20: 	@echo -e "ifeq (\$$(S),1)" >> Makefile.cd.tmp
   21: 	@echo -e "\t@echo \"There is enough disk space.  Good!\"" >> Makefile.cd.tmp
   22: 	# set up commands to copy cd image from install.lon-capa.org (wget -r)
   23: 	@echo -e "\tcd \$$(TARGET); wget -np -N -r -l 1000 http://install.lon-capa.org/3.1/currentcdsource" >> Makefile.cd.tmp
   24: 	@echo -e "\tcd \$$(TARGET); find ./install.lon-capa.org -name index.html | xargs rm -f" >> Makefile.cd.tmp
   25: 	# set up cvs update commands
   26: 	# set up cd image compilation (mkisofs)
   27: 	@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
   28: 	@echo -e "else" >> Makefile.cd.tmp
   29: 	@echo -e "\t@echo \"ERROR ******* Not enough disk space. There must be at least one gigabyte free\"" >> Makefile.cd.tmp
   30: 	@echo -e "endif" >> Makefile.cd.tmp
   31: 	@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
   32: 	make -f Makefile.cd.tmp TARGET="$(CDTARGET)" cd
   33: 
   34: cd_cover:
   35: 
   36: HTML:
   37: 	install -d HTML
   38: 	cp ../../doc/loncapafiles/*.gif HTML
   39: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > HTML/index.html
   40: 
   41: status:
   42: 	install -d HTML
   43: 	cp ../../doc/loncapafiles/*.gif HTML
   44: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
   45: 	perl lpml_parse.pl html $(CATEGORY) $(DIST) "../.." "" > \
   46: 	HTML/filestatus.html
   47: #	perl parse.pl ../../doc/loncapafiles/loncapafiles.html status > HTML/filestatus.html
   48: 
   49: statuspost: status
   50: 	cp ../../doc/loncapafiles/*.gif /home/httpd/html/lon-status
   51: 	cp HTML/filestatus.html /home/httpd/html/lon-status/filestatus.html
   52: 
   53: rpmstatus:
   54: 	install -d RPMSTATUS
   55: 	rpm -qa --queryformat '%{NAME}\t%{VERSION}\t%{BUILDTIME}\n' | sort > RPMSTATUS/current.tmp
   56: 	cat ../../doc/otherfiles/cd_rpms.txt > RPMSTATUS/standard.tmp
   57: 	cat ../../doc/otherfiles/rpm_list.txt > RPMSTATUS/expected.tmp
   58: 	perl rpmparse.pl RPMSTATUS/standard.tmp RPMSTATUS/current.tmp RPMSTATUS/expected.tmp > RPMSTATUS/rpmstatus.html
   59: 
   60: rpmstatuspost: rpmstatus
   61: 	cp RPMSTATUS/rpmstatus.html /home/httpd/html/lon-status/rpmstatus.html
   62: 
   63: LCMakefile:
   64: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html LCMakefile > LCMakefile
   65: 
   66: SPEC:
   67: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html SPEC
   68: 
   69: configinstall: Makefile.configinstall
   70: 	make -f Makefile.configinstall SOURCE="../.." TARGET="" configfiles
   71: #	perl loncaparestoreconfigurations lasttimestamp
   72: #	make -f Makefile.configinstall TARGET="" configpermissions
   73: 
   74: Makefile.configinstall: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
   75: #	perl parse.pl ../../doc/loncapafiles/loncapafiles.html configinstall > Makefile.configinstall
   76: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
   77: 	perl lpml_parse.pl configinstall $(CATEGORY) $(DIST) "../.." "" > \
   78: 	Makefile.configinstall
   79: 
   80: install: build Makefile.install
   81: 	make -f Makefile.install SOURCE="../.." TARGET="" directories
   82: 	make -f Makefile.install SOURCE="../.." TARGET="" files
   83: 	make -f Makefile.install SOURCE="../.." TARGET="" links
   84: 	make configinstall
   85: 
   86: Makefile.install: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
   87: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
   88: 	perl lpml_parse.pl install $(CATEGORY) $(DIST) "../.." "" > \
   89: 	Makefile.install
   90: 
   91: build: Makefile.build
   92: 	make -f Makefile.build all
   93: 
   94: Makefile.build: ../../doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
   95: 	cat ../../doc/loncapafiles/loncapafiles.lpml | \
   96: 	perl lpml_parse.pl build $(CATEGORY) $(DIST) "../.." "" > \
   97: 	Makefile.build
   98: 
   99: RPM: BinaryRoot
  100: 	cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
  101: 	cat setup_file_list.txt | perl make_rpm.pl setup 3.1 '' '' BinaryRoot
  102: 	cp LON-CAPA-base-3.1-1.i386.rpm $(CDFSLOC)/RedHat/RPMS/.
  103: 	cp LON-CAPA-setup-3.1-1.i386.rpm $(CDFSLOC)/RedHat/RPMS/.
  104: 
  105: BinaryRoot:
  106: 	perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
  107: 
  108: loncapaconfig:
  109: 	rm -Rf LoncapaconfigRoot
  110: 	install -d LoncapaconfigRoot/usr/src/
  111: 	install -d LoncapaconfigRoot/usr/lib/python1.5/site-packages
  112: 	install /usr/lib/python1.5/site-packages/kudzumodule.so LoncapaconfigRoot/usr/lib/python1.5/site-packages/kudzumodule.so
  113: 	cd LoncapaconfigRoot/usr/src; cp -pR /mnt/drive/loncapaconfig .
  114: 	install -d LoncapaconfigRoot/usr/sbin
  115: 	@echo -e "#!/bin/sh\ncd /usr/src/loncapaconfig/usr/bin; ./loncapaconfig\n" > LoncapaconfigRoot/usr/sbin/loncapaconfig
  116: 	chmod u+x LoncapaconfigRoot/usr/sbin/loncapaconfig
  117: 	find LoncapaconfigRoot -type d | xargs chmod o-wxr
  118: 	find LoncapaconfigRoot -type f | xargs chmod o-wxr
  119: 	find LoncapaconfigRoot/ -type d | grep 'src/lon' > loncapaconfig_file_list.txt
  120: 	find LoncapaconfigRoot/ -type d | grep '^LoncapaconfigRoot/usr/lib/python1.5/site-packages' >> loncapaconfig_file_list.txt
  121: 	find LoncapaconfigRoot/ -type f >> loncapaconfig_file_list.txt
  122: 	cat loncapaconfig_file_list.txt | perl make_rpm.pl loncapaconfig 3.1 '' '' LoncapaconfigRoot
  123: 	cp LON-CAPA-loncapaconfig-3.1-1.i386.rpm /mnt/drive/install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/.
  124: 
  125: install.lon-capa.org: cvsreport
  126: 	install -d docs
  127: 	install ../../doc/build/cvsreport.html docs/cvsreport.html
  128: 	install ../../doc/build/doc.html docs/index.html
  129: 	install -d docs/hardware
  130: 	install ../../doc/hardware/hardware.html docs/hardware/hardware.html
  131: 	install -d docs/3.1
  132: 	install ../../doc/build/install.html docs/3.1/index.html
  133: 	install ../../doc/build/instructions_with_cd.html docs/3.1/instructions_with_cd.html
  134: 	install ../../doc/build/libraryserverconfiguration.gif docs/3.1/libraryserverconfiguration.gif
  135: 	install ../../doc/build/librarysystemsettings.gif docs/3.1/librarysystemsettings.gif
  136: 	install -d docs/cvsupgrade
  137: 	install ../../doc/build/cvsupgrade.html docs/cvsupgrade/index.html
  138: 	install -d docs/upgrade
  139: 	install ../../doc/build/upgrade.html docs/upgrade/index.html
  140: 	install -d docs/reconfig
  141: 	install ../../doc/build/reconfig.html docs/reconfig/index.html
  142: 	install -d docs/3.1/otherfiles
  143: 	install ../../doc/otherfiles/rpm_list.txt docs/3.1/otherfiles/rpm_list.txt
  144: 	install ../../doc/build/loncapanetwork.html docs/loncapanetwork.html
  145: 	install ../../doc/build/loncapanfs.html docs/loncapanfs.html
  146: 	install ../../doc/build/loncapaappleshares.html docs/loncapaappleshares.html
  147: 	install ../../doc/build/loncapasqldatabase.html docs/loncapasqldatabase.html
  148: 	install ../../doc/build/loncapapasswords.html docs/loncapapasswords.html
  149: 	install ../../doc/build/loncapapasswordauthentication.html docs/loncapapasswordauthentication.html
  150: 	install ../../doc/build/loncapatimesync.html docs/loncapatimesync.html
  151: 	install ../../doc/build/loncapamathequivalency.html docs/loncapamathequivalency.html
  152: 	tar czvf install.lon-capa.org_docs.tar.gz docs
  153: 	rm -Rf docs
  154: 
  155: cvsreport:
  156: 	echo "<H1>Automatically generated CVS report</H1>" > ../../doc/build/cvsreport.html
  157: 	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
  158: 	echo "<P>Number of altered files:" >> ../../doc/build/cvsreport.html
  159: 	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
  160: 	echo "</P><P>Altered files:</P><P><PRE>" >> ../../doc/build/cvsreport.html
  161: 	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
  162: 	echo "</PRE></P><P>Log entries for <B>loncom</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
  163: 	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
  164: 	echo "</PRE></P><P>Log entries for <B>CAPA</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
  165: 	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
  166: 	echo "</PRE></P><P>Log entries for <B>doc</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
  167: 	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
  168: 	echo "</PRE></P><P>Log entries for <B>packaging</B>:</P><PRE>" >> ../../doc/build/cvsreport.html
  169: 	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
  170: 	echo "</PRE></P>" >> ../../doc/build/cvsreport.html
  171: clean:
  172: 	rm -Rf HTML
  173: 	rm -f *.spec
  174: 	rm -f LCMakefile
  175: 	rm -Rf BinaryRoot
  176: 	rm -f Makefile.BinaryRoot
  177: 	rm -f Makefile.build
  178: 	rm -f Makefile.install
  179: 	rm -f Makefile.install.tmp
  180: 	rm -f Makefile.cd.tmp
  181: 	rm -f *.rpm

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