Annotation of loncom/build/readme.html, revision 1.10
1.1 harris41 1: <H1>LON-CAPA Software Developer Instructions</H1>
2:
1.2 harris41 3: <OL>
4: <LI><A HREF="#Using_CVS">Using CVS</A>
5: <UL>
6: <LI><A HREF="#cvslog">Logging in and out (cvs login; cvs logout)</A>
7: <LI><A HREF="#cvsget">Getting files (cvs update -d)</A>
8: <LI><A HREF="#cvsupdate">Updating files (cvs update -d)</A>
9: <LI><A HREF="#cvssave">Saving files (cvs commit)</A>
10: <LI><A HREF="#cvsadd">Adding files (cvs add)</A>
11: <LI><A HREF="#cvsadddir">Adding directories (cvs add/import)</A>
12: <LI><A HREF="#cvsnotsure">What to do when you're not sure about your files (cvs update)</A>
13: </UL>
14: <LI><A HREF="#makeHTML">Viewing the software (make HTML)</A>
15: <LI><A HREF="#makebuild">Compiling the software (make build)</A>
16: <LI><A HREF="#loncapafiles">Adding/removing files from the LON-CAPA installation (doc/loncapafiles/loncapafiles.html)</A>
17: <LI><A HREF="#configversusnonconfig">Configurable files versus non-configurable files</A>
18: <LI><A HREF="#makeinstall">Updating the non-configurable files on your machine (make install)</A>
19: <LI><A HREF="#makeconfiginstall">Updating the configurable files on your machine (make configinstall)</A>
20: <LI><A HREF="#makeRPM">Building RPMs (make RPM)</A>
21: </OL>
22:
23: <OL>
24: <A NAME="Using_CVS">
25: <LI><H2>Using CVS</H2>
1.1 harris41 26: <UL>
1.2 harris41 27: <LI><A NAME="cvslog">
28: <H3>Using CVS: Logging in and out (cvs login; cvs logout)</H3>
29: <LI><A NAME="cvsget">
30: <H3>Using CVS: Getting files (cvs update -d)</H3>
31: <LI><A NAME="cvsupdate">
1.4 harris41 32: <H3>Using CVS: Updating files (cvs update -d)</H3>
1.2 harris41 33: <LI><A NAME="cvssave">
1.4 harris41 34: <H3>Using CVS: Saving files (cvs commit)</H3>
1.2 harris41 35: <LI><A NAME="cvsadd">
1.4 harris41 36: <H3>Using CVS: Adding files (cvs add)</H3>
1.2 harris41 37: <LI><A NAME="cvsadddir">
1.4 harris41 38: <H3>Using CVS: Adding directories (cvs add/import)</H3>
1.2 harris41 39: <LI><A NAME="cvsnotsure">
1.4 harris41 40: <H3>Using CVS: What to do when you're not sure about your files (cvs update)</H3>
1.1 harris41 41: </UL>
1.2 harris41 42: <LI><A NAME="makeHTML">
1.3 harris41 43: <H2>Viewing the software (make HTML)</H2>
1.5 harris41 44: <STRONG>Commands</STRONG>
45: <FONT COLOR="#008800">
46: <PRE>
47: cd loncom/build
1.8 harris41 48: rm -Rf HTML <I>(or alternatively, "make clean")</I>
1.5 harris41 49: make HTML
50: cd HTML
51: <I>(look at the index.html file with a web browser such as Netscape)</I>
52: </PRE>
53: </FONT>
1.6 harris41 54: <STRONG>General description of what happens</STRONG>
55: <P>
56: This is the actual make target code.
57: <FONT COLOR="#880000">
58: <PRE>
59: <!-- LONCAPA MAKETARGET=HTML START -->
60: HTML:
61: install -d HTML
62: cp ../../doc/loncapafiles/*.gif HTML
1.7 harris41 63: perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > HTML/index.html
1.6 harris41 64: <!-- LONCAPA MAKETARGET=HTML END -->
65: </PRE>
66: </FONT>
1.7 harris41 67: What basically happens is that specially marked-up data in the LON-CAPA
68: cvs repository file <TT>doc/loncapafiles.html</TT> is parsed into a more
69: viewable format by <TT>loncom/build/parse.pl</TT>. The resulting
70: file gives a very well organized view of all the files, directories,
71: links, ownerships, permissions, and brief documentation of what each
72: file does.
1.6 harris41 73: </P>
1.2 harris41 74: <LI><A NAME="makebuild">
1.3 harris41 75: <H2>Compiling the software (make build)</H2>
1.8 harris41 76: <STRONG>Commands</STRONG>
77: <FONT COLOR="#008800">
78: <PRE>
79: cd loncom/build
1.9 harris41 80: make build
1.8 harris41 81: </PRE>
82: </FONT>
83: <STRONG>General description of what happens</STRONG>
84: <P>
85: This is the actual make target code.
86: <FONT COLOR="#880000">
87: <PRE>
88: <!-- LONCAPA MAKETARGET=HTML START -->
89: build:
90: perl parse.pl ../../doc/loncapafiles/loncapafiles.html build > Makefile.build
91: make -f Makefile.build all
92: <!-- LONCAPA MAKETARGET=HTML END -->
93: </PRE>
94: </FONT>
95: <TT>loncom/build/parse.pl</TT> reads in all the build information out
1.10 ! harris41 96: of <TT>doc/loncapafiles/loncapafiles.html</TT>. A new Makefile named
1.8 harris41 97: <TT>loncom/build/Makefile.build</TT> is dynamically constructed.
98: This dynamically generated Makefile is then run to build/compile
99: all the software targets from source. This currently takes 10 minutes
100: (depends on the speed of the machine you compile with).
101: </P>
102: <STRONG>Example</STRONG>
103: <P>
104: Here is information for one file <TT>tth.so</TT> provided in
105: <TT>doc/loncapafiles/loncapafiles.html</TT>.
1.9 harris41 106: <FONT COLOR="#330066">
1.8 harris41 107: <PRE>
108: <BR><METAGROUP>
109: <BR><LONCAPA TYPE=LOCATION DIST="redhat6.2" SOURCE="loncom/modules/TexConvert/tthperl/tth.so" TARGET="usr/lib/perl5/site_perl/5.005/tth.so" CATEGORY="system file">
110: <BR><DESCRIPTION>
111: <BR>shared library file for dynamic loading and unloading of TeX-to-HTML functionality
112: <BR></DESCRIPTION>
113: <BR><BUILD>
114: <BR>loncom/modules/TexConvert/tthperl/commands
115: <BR></BUILD>
116: <BR><DEPENDENCIES>
117: <BR>../tthdynamic/tthfunc.c
118: <BR>../ttmdynamic/ttmfunc.c
119: <BR></DEPENDENCIES>
120: </PRE>
121: </FONT>
122: <TT>loncom/build/parse.pl</TT> sees the <B>BUILD</B> tags and sets up
123: a dynamic file <TT>Makefile.build</TT> to run the command inside the
124: <B>BUILD</B> tags (currently, <B>DEPENDENCIES</B> is not used for anything
125: besides documentation).
126: </P>
127: <P>
128: Here is an example of a dynamically generated <TT>Makefile.build</TT>
129: that builds two LON-CAPA files (one of which is <TT>tth.so</TT>.
1.9 harris41 130: <FONT COLOR="#330066">
1.8 harris41 131: <PRE>
132: all: ../homework/caparesponse/capa.so ../modules/TexConvert/tthperl/tth.so
133:
134: ../homework/caparesponse/capa.so: ../homework/caparesponse/caparesponse.c ../ho
135: mework/caparesponse/caparesponse.pm alwaysrun
136: cd ../homework/caparesponse/; sh ./commands
137:
138: ../modules/TexConvert/tthperl/tth.so: ../modules/TexConvert/tthperl/../tthdynam
139: ic/tthfunc.c ../modules/TexConvert/tthperl/../ttmdynamic/ttmfunc.c
140: cd ../modules/TexConvert/tthperl/; sh ./commands
141:
142: alwaysrun:
143: </PRE>
144: </FONT>
145: </P>
1.2 harris41 146: <LI><A NAME="loncapafiles">
1.3 harris41 147: <H2>Adding/removing files from the LON-CAPA installation (doc/loncapafiles/loncapafiles.html)</H2>
1.2 harris41 148: <LI><A NAME="configversusnonconfig">
1.3 harris41 149: <H2>Configurable files versus non-configurable files</H2>
1.2 harris41 150: <LI><A NAME="makeinstall">
1.3 harris41 151: <H2>Updating the non-configurable files on your machine (make install)</H2>
1.2 harris41 152: <LI><A NAME="makeconfiginstall">
1.3 harris41 153: <H2>Updating the configurable files on your machine (make configinstall)</H2>
1.2 harris41 154: <LI><A NAME="makeRPM">
1.3 harris41 155: <H2>Building RPMs (make RPM)</H2>
1.2 harris41 156: </OL>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>