1: # Makefile
2: # For LON-CAPA
3: # Scott Harrison
4: # November 2000
5:
6: CDTARGET="."
7:
8: all:
9: # nothing yet here
10:
11: cd:
12: # Build temporary script to get cd
13: # make sure there is enough disk space
14: @echo "# Automatically generated Makefile for LON-CAPA" > Makefile.cd.tmp
15: @/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
16: @echo "cd:" >> Makefile.cd.tmp
17: @echo -e "ifeq (\$$(S),1)" >> Makefile.cd.tmp
18: @echo -e "\t@echo \"There is enough disk space. Good!\"" >> Makefile.cd.tmp
19: # set up commands to copy cd image from install.lon-capa.org (wget -r)
20: @echo -e "\tcd \$$(TARGET); wget -np -N -r -l 1000 http://install.lon-capa.org/3.1/currentcdsource" >> Makefile.cd.tmp
21: @echo -e "\tcd \$$(TARGET); find ./install.lon-capa.org -name index.html | xargs rm -f" >> Makefile.cd.tmp
22: # set up cvs update commands
23: # set up cd image compilation (mkisofs)
24: @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
25: @echo -e "else" >> Makefile.cd.tmp
26: @echo -e "\t@echo \"ERROR ******* Not enough disk space. There must be at least one gigabyte free\"" >> Makefile.cd.tmp
27: @echo -e "endif" >> Makefile.cd.tmp
28: @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
29: make -f Makefile.cd.tmp TARGET="$(CDTARGET)" cd
30:
31: cd_cover:
32:
33: HTML:
34: install -d HTML
35: cp ../../doc/loncapafiles/*.gif HTML
36: perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > HTML/index.html
37:
38: status:
39: install -d HTML
40: cp ../../doc/loncapafiles/*.gif HTML
41: perl parse.pl ../../doc/loncapafiles/loncapafiles.html status > HTML/filestatus.html
42:
43: LCMakefile:
44: perl parse.pl ../../doc/loncapafiles/loncapafiles.html LCMakefile > LCMakefile
45:
46: SPEC:
47: perl parse.pl ../../doc/loncapafiles/loncapafiles.html SPEC
48:
49: configinstall:
50: # there is a dependency on having directories in place, but oh well...
51: perl parse.pl ../../doc/loncapafiles/loncapafiles.html configinstall > Makefile.configinstall
52: make -f Makefile.configinstall SOURCE="../.." TARGET="" configfiles
53: perl loncaparestoreconfigurations lasttimestamp
54: make -f Makefile.configinstall TARGET="" configpermissions
55:
56: install: build
57: perl parse.pl ../../doc/loncapafiles/loncapafiles.html install > Makefile.install
58: make -f Makefile.install SOURCE="../.." TARGET="" directories
59: make -f Makefile.install SOURCE="../.." TARGET="" files
60: make -f Makefile.install SOURCE="../.." TARGET="" links
61:
62: build:
63: perl parse.pl ../../doc/loncapafiles/loncapafiles.html build > Makefile.build
64: make -f Makefile.build all
65:
66: RPM: BinaryRoot
67: cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
68:
69: BinaryRoot:
70: perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
71:
72: clean:
73: rm -Rf HTML
74: rm -f *.spec
75: rm -f LCMakefile
76: rm -Rf BinaryRoot
77: rm -f Makefile.BinaryRoot
78: rm -f Makefile.build
79: rm -f Makefile.install
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>