File:  [LON-CAPA] / loncom / build / Makefile
Revision 1.32: download - view: text, annotated - select for diffs
Mon Mar 12 15:34:08 2001 UTC (23 years, 3 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
minor change to rpm making step -Scott

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

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