Update of /cvsroot/squeak/squeak/platforms/unix/doc/HowToBuildFromSource.html In directory sc8-pr-cvs1:/tmp/cvs-serv30143/doc/HowToBuildFromSource.html Added Files: HowToBuildFromSource-img1.png HowToBuildFromSource-node1.html HowToBuildFromSource-node2.html HowToBuildFromSource-node3.html HowToBuildFromSource-node4.html HowToBuildFromSource-node5.html HowToBuildFromSource-node6.html HowToBuildFromSource.css HowToBuildFromSource.html contents.png index.html index.png next.png next_g.png prev.png prev_g.png up.png up_g.png Log Message: Ian Piumarta's release 3.4.1 --- NEW FILE: HowToBuildFromSource-img1.png --- PNG Pä --- NEW FILE: HowToBuildFromSource-node1.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002 (1.67) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Contents</TITLE> <META NAME="description" CONTENT="Contents"> <META NAME="keywords" CONTENT="HowToBuildFromSource"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="HowToBuildFromSource.css"> <LINK REL="next" HREF="HowToBuildFromSource-node2.html"> <LINK REL="previous" HREF="HowToBuildFromSource.html"> <LINK REL="up" HREF="HowToBuildFromSource.html"> <LINK REL="next" HREF="HowToBuildFromSource-node2.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html41" HREF="HowToBuildFromSource-node2.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html37" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html31" HREF="HowToBuildFromSource.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html39" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html42" HREF="HowToBuildFromSource-node2.html">1 configure - build</A> <B> Up:</B> <A NAME="tex2html38" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html32" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A>   <B> <A NAME="tex2html40" HREF="HowToBuildFromSource-node5.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <BR> <H2><A NAME="SECTION00010000000000000000"> Contents</A> </H2> <!--Table of Contents--> <UL> <LI><A NAME="tex2html43" HREF="HowToBuildFromSource-node2.html">1 configure - build - install</A> <LI><A NAME="tex2html44" HREF="HowToBuildFromSource-node3.html">2 Generating your own VM and plugin sources</A> <LI><A NAME="tex2html45" HREF="HowToBuildFromSource-node4.html">3 Adding your own plugins</A> <UL> <LI><A NAME="tex2html46" HREF="HowToBuildFromSource-node4.html#SECTION00041000000000000000">3.1 Plugin-specific configuration</A> <LI><A NAME="tex2html47" HREF="HowToBuildFromSource-node4.html#SECTION00042000000000000000">3.2 Plugin-specific Makefile declarations and rules</A> <LI><A NAME="tex2html48" HREF="HowToBuildFromSource-node4.html#SECTION00043000000000000000">3.3 Examples taken from existing plugins</A> <LI><A NAME="tex2html49" HREF="HowToBuildFromSource-node4.html#SECTION00044000000000000000">3.4 Coping with VMMaker quirks</A> <LI><A NAME="tex2html50" HREF="HowToBuildFromSource-node4.html#SECTION00045000000000000000">3.5 If all else fails</A> </UL> <BR> <LI><A NAME="tex2html51" HREF="HowToBuildFromSource-node5.html">Index</A> </UL> <!--End of Table of Contents--> <P> <BR><HR> <ADDRESS> Ian Piumarta 2002-06-05 </ADDRESS> </BODY> </HTML> --- NEW FILE: HowToBuildFromSource-node2.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002 (1.67) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>1 configure - build - install</TITLE> <META NAME="description" CONTENT="1 configure - build - install"> <META NAME="keywords" CONTENT="HowToBuildFromSource"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="HowToBuildFromSource.css"> <LINK REL="next" HREF="HowToBuildFromSource-node3.html"> <LINK REL="previous" HREF="HowToBuildFromSource-node1.html"> <LINK REL="up" HREF="HowToBuildFromSource.html"> <LINK REL="next" HREF="HowToBuildFromSource-node3.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html64" HREF="HowToBuildFromSource-node3.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html58" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html52" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html60" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html62" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html65" HREF="HowToBuildFromSource-node3.html">2 Generating your own</A> <B> Up:</B> <A NAME="tex2html59" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html53" HREF="HowToBuildFromSource-node1.html">Contents</A>   <B> <A NAME="tex2html61" HREF="HowToBuildFromSource-node1.html">Contents</A></B>   <B> <A NAME="tex2html63" HREF="HowToBuildFromSource-node5.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00020000000000000000"> 1 <TT>configure</TT> - <TT>build</TT> - <TT>install</TT></A> </H1> <P> Unix Squeak is built using the (almost) universal ``<TT>configure; make; make install</TT>''. If you haven't come across this before, read on... <P> Create a build<A NAME="43"></A> directory (which we will call `<TT>blddir</TT>' from now on) and then `<TT>cd</TT>' to it: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ mkdir blddir <BR> $ cd blddir <BR></FONT></TT> </DIV> </FONT> <P> A convenient place is just next to the <TT>platforms</TT> directory, like this: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ cd squeak <BR> $ ls <BR> platforms src ... <BR> $ mkdir bld <BR> $ cd bld <BR></FONT></TT> </DIV> </FONT> <P> Create the build<A NAME="55"></A> environment by running the script <TT>configure</TT> which lives in the <TT>platforms/unix/config</TT> directory. <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: The <TT>configure</TT> script accepts lots of options. To see a list of them, run: `<code>configure --help</code>' </FONT></BLOCKQUOTE> <P> Assuming you've created the <TT>blddir</TT> next to <TT>platforms</TT>, this would be: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ ../platforms/unix/config/configure <BR></FONT></TT> </DIV> </FONT> <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: This assumes that the VMMaker sources are in `<TT>../src</TT>'. However, since the Unix Squeak support code is independent of the image version from which VMMaker generated the interpreter/plugin sources, it is possible that your source distribution comes with more than one <TT>src</TT> directory (corresponding to more than one image version used to generate the sources). In such cases you will have to tell <TT>configure</TT> which source version to use, via the `-<TT>-with-src</TT>' option. For example, if there are two source directories called <TT>src-3.2gamma-4857</TT> and <TT>src-3.3.alpha-4881</TT> then you would use <I>one</I> of the following commands: <FONT COLOR="#ff0000"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#ff0000"> <BR> $ .../configure --with-src=src-3.2gamma-4857 <BR> <I>or</I> <BR> $ .../configure --with-src=src-3.3alpha-4881 <BR></FONT></TT> </DIV> </FONT> </FONT></BLOCKQUOTE> <P> Build the VM and plugins by running <TT>make</TT>: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ make <BR></FONT></TT> </DIV> </FONT> <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: If you want to build just the VM (without external plugins) or just the external plugins (without the VM) then you can use: `<code>make squeak</code>' or `<code>make plugins</code>' respectively. </FONT></BLOCKQUOTE> <P> Finally install the VM, plugins and manual pages: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ su root <BR> $ make install <BR></FONT></TT> </DIV> </FONT> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html64" HREF="HowToBuildFromSource-node3.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html58" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html52" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html60" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html62" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html65" HREF="HowToBuildFromSource-node3.html">2 Generating your own</A> <B> Up:</B> <A NAME="tex2html59" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html53" HREF="HowToBuildFromSource-node1.html">Contents</A>   <B> <A NAME="tex2html61" HREF="HowToBuildFromSource-node1.html">Contents</A></B>   <B> <A NAME="tex2html63" HREF="HowToBuildFromSource-node5.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> Ian Piumarta 2002-06-05 </ADDRESS> </BODY> </HTML> --- NEW FILE: HowToBuildFromSource-node3.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002 (1.67) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>2 Generating your own VM and plugin sources</TITLE> <META NAME="description" CONTENT="2 Generating your own VM and plugin sources"> <META NAME="keywords" CONTENT="HowToBuildFromSource"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="HowToBuildFromSource.css"> <LINK REL="next" HREF="HowToBuildFromSource-node4.html"> <LINK REL="previous" HREF="HowToBuildFromSource-node2.html"> <LINK REL="up" HREF="HowToBuildFromSource.html"> <LINK REL="next" HREF="HowToBuildFromSource-node4.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html78" HREF="HowToBuildFromSource-node4.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html72" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html66" HREF="HowToBuildFromSource-node2.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html74" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html76" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html79" HREF="HowToBuildFromSource-node4.html">3 Adding your own</A> <B> Up:</B> <A NAME="tex2html73" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html67" HREF="HowToBuildFromSource-node2.html">1 configure - build</A>   <B> <A NAME="tex2html75" HREF="HowToBuildFromSource-node1.html">Contents</A></B>   <B> <A NAME="tex2html77" HREF="HowToBuildFromSource-node5.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00030000000000000000"> 2 Generating your own VM and plugin sources</A> </H1> <P> Generating your own VM/plugin sources might be necessary for various reasons: <UL> <LI>you want to change the mix of internal vs. external plugins </LI> <LI>you want to remove some plugins from the VM that you will never use </LI> <LI>you've pulled in some updates that modify the Interpreter or plugins </LI> <LI>you've filed-in (or written) a whole new plugin </LI> <LI>etc... </LI> </UL> <P> Version 3.2 (and later) of Unix Squeak use <A NAME="tex2html2" HREF="http://minnow.cc.gatech.edu/squeak/2105">VMMaker</A><A NAME="100"></A> to generate the core interpreter and plugin sources. <P> Start Squeak in the top-level directory (the one containing the <TT>platforms</TT> directory); for example: <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ ls <BR> src platforms ... <BR> $ squeak MyCoolPlugin.image <BR></FONT></TT> </DIV> </FONT> <P> Open a VMMakerTool and modify the setup to your liking. <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: The VMMaker configuration used to build the distributions of Unix Squeak is available in <TT>platforms/unix/config/VMMaker.config</TT>.<A NAME="108"></A> </FONT></BLOCKQUOTE> <P> Then click on the relevant ``<I>generate ...</I>'' button. You can now `<TT>configure; make; make install</TT>' in your <TT>blddir</TT> (as described above). <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: You only need to run <TT>configure</TT><A NAME="515"></A> <B><U>once</U></B> for a given <TT>blddir</TT> (on the same host). If you modify the choice of plugins (or change whether they're internal/external) then you can update the build environment by running the <TT>config.status</TT><A NAME="517"></A> script in the <TT>bldddir</TT>, like this: <FONT COLOR="#ff0000"> <DIV ALIGN="LEFT"> <TT> $ squeak MyCoolPlugin.image <BR> ... generate new sources ... <BR> $ cd blddir <BR> $ ./config.status <BR> $ make <BR></TT> </DIV> </FONT>This is <I>much</I> faster than running <TT>configure</TT> all over again. (In fact, <TT>make</TT> should detect any changes to the plugin configuration and re-run <TT>config.status</TT> for you automatically.) </FONT></BLOCKQUOTE> <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: `<TT>configure</TT>' doesn't actually create any files. The last thing it does is run `<TT>config.status</TT>' to create the configured <I>file</I>s in <TT>blddir</TT> from the corresponding <I>file.in</I>s in the <TT>unix/config</TT> directory. So in the remainder of this document the phrase `during configuration' means <I>either</I> when running `<TT>configure</TT>' for the first time <I>or</I> running `<TT>config.status</TT>' to update an already <TT>configure</TT>d build environment. </FONT></BLOCKQUOTE> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html78" HREF="HowToBuildFromSource-node4.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html72" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html66" HREF="HowToBuildFromSource-node2.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html74" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html76" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html79" HREF="HowToBuildFromSource-node4.html">3 Adding your own</A> <B> Up:</B> <A NAME="tex2html73" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html67" HREF="HowToBuildFromSource-node2.html">1 configure - build</A>   <B> <A NAME="tex2html75" HREF="HowToBuildFromSource-node1.html">Contents</A></B>   <B> <A NAME="tex2html77" HREF="HowToBuildFromSource-node5.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> Ian Piumarta 2002-06-05 </ADDRESS> </BODY> </HTML> --- NEW FILE: HowToBuildFromSource-node4.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002 (1.67) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>3 Adding your own plugins</TITLE> <META NAME="description" CONTENT="3 Adding your own plugins"> <META NAME="keywords" CONTENT="HowToBuildFromSource"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="HowToBuildFromSource.css"> <LINK REL="next" HREF="HowToBuildFromSource-node5.html"> <LINK REL="previous" HREF="HowToBuildFromSource-node3.html"> <LINK REL="up" HREF="HowToBuildFromSource.html"> <LINK REL="next" HREF="HowToBuildFromSource-node5.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html92" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html86" HREF="HowToBuildFromSource.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html80" HREF="HowToBuildFromSource-node3.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html88" HREF="HowToBuildFromSource-node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html90" HREF="HowToBuildFromSource-node5.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html93" HREF="HowToBuildFromSource-node5.html">Index</A> <B> Up:</B> <A NAME="tex2html87" HREF="HowToBuildFromSource.html">Building Unix Squeak (</A> <B> Previous:</B> <A NAME="tex2html81" HREF="HowToBuildFromSource-node3.html">2 Generating your own</A>   <B> <A NAME="tex2html89" HREF="HowToBuildFromSource-node1.html">Contents</A></B>   <B> <A NAME="tex2html91" HREF="HowToBuildFromSource-node5.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html94" HREF="HowToBuildFromSource-node4.html#SECTION00041000000000000000">3.1 Plugin-specific configuration</A> <UL> <LI><A NAME="tex2html95" HREF="HowToBuildFromSource-node4.html#SECTION00041100000000000000">3.1.1 <TT>AC_PLUGIN_CHECK_LIB(<I>lib</I>,<I>func</I>)</TT></A> <LI><A NAME="tex2html96" HREF="HowToBuildFromSource-node4.html#SECTION00041200000000000000">3.1.2 <TT>AC_PLUGIN_DEFINE_UNQUOTED(<I>keyword</I>,<I>text</I>)</TT></A> <LI><A NAME="tex2html97" HREF="HowToBuildFromSource-node4.html#SECTION00041300000000000000">3.1.3 Plugin-specific variables</A> </UL> <BR> <LI><A NAME="tex2html98" HREF="HowToBuildFromSource-node4.html#SECTION00042000000000000000">3.2 Plugin-specific <TT>Makefile</TT> declarations and rules</A> <UL> <LI><A NAME="tex2html99" HREF="HowToBuildFromSource-node4.html#SECTION00042100000000000000">3.2.1 The anatomy of a plugin's <TT>Makefile</TT></A> <LI><A NAME="tex2html100" HREF="HowToBuildFromSource-node4.html#SECTION00042200000000000000">3.2.2 A note about <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> commands</A> <LI><A NAME="tex2html101" HREF="HowToBuildFromSource-node4.html#SECTION00042300000000000000">3.2.3 Specifying additional source directories</A> <LI><A NAME="tex2html102" HREF="HowToBuildFromSource-node4.html#SECTION00042400000000000000">3.2.4 Including additional material in the default <TT>Makefile</TT></A> <LI><A NAME="tex2html103" HREF="HowToBuildFromSource-node4.html#SECTION00042500000000000000">3.2.5 Replacing the default <TT>Makefile</TT> entirely</A> </UL> <BR> <LI><A NAME="tex2html104" HREF="HowToBuildFromSource-node4.html#SECTION00043000000000000000">3.3 Examples taken from existing plugins</A> <UL> <LI><A NAME="tex2html105" HREF="HowToBuildFromSource-node4.html#SECTION00043100000000000000">3.3.1 Configuration</A> <LI><A NAME="tex2html106" HREF="HowToBuildFromSource-node4.html#SECTION00043200000000000000">3.3.2 Customising the <TT>Makefile</TT></A> </UL> <BR> <LI><A NAME="tex2html107" HREF="HowToBuildFromSource-node4.html#SECTION00044000000000000000">3.4 Coping with VMMaker quirks</A> <LI><A NAME="tex2html108" HREF="HowToBuildFromSource-node4.html#SECTION00045000000000000000">3.5 If all else fails</A> </UL> <!--End of Table of Child-Links--> <HR> <H1><A NAME="SECTION00040000000000000000"> 3 Adding your own plugins</A> </H1> <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: This section is intended primarily for plugin developers. </FONT></BLOCKQUOTE> <P> If your plugin<A NAME="146"></A> requires no platform-specific tweaks then there's nothing for you to do. <TT>configure</TT> (and <TT>config.status</TT>) will provide a default <TT>Makefile</TT> for it that should work. If your plugin requires only platform-independent tweaks (and/or additional hand-written code) then these go in <TT>platforms/Cross/plugins</TT>, and there's nothing for you to do (in Unixland). <P> On the other hand, if you require special <TT>configure</TT> tests or additional declarations/rules in your plugin's <TT>Makefile</TT> then you need to specify them explicitly. <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: Unix Squeak subscribes to the following philopsophy: </FONT></BLOCKQUOTE> <P> <BLOCKQUOTE><FONT COLOR="#ff0000"><I>Absolutely everything that is specific<A NAME="154"></A> to Unix (sources, headers, <TT>configure</TT> and <TT>Makefile</TT> extensions, etc.) lives under <TT>platforms/unix</TT>.</I> </FONT></BLOCKQUOTE> <P> <BLOCKQUOTE><FONT COLOR="#ff0000">In other words: there is not (nor aught there be) <I>any</I> Unix-related information under the <TT>platforms/Cross</TT> directory. (Unix Squeak is entirely encapsulated under <TT>platforms/unix</TT> and is utterly immune to ``random junk'' elsewhere in the <TT>platforms</TT> tree.) </FONT></BLOCKQUOTE> <P> First you must create a new directory<A NAME="163"></A> under <TT>platforms/unix/plugins</TT> named after your plugin. This directory will hold the files describing the additional configuration checks and/or <TT>Makefile</TT> contents. For example, if your plugin is called ``MyCoolPlugin'' then <FONT COLOR="#0000ff"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#0000ff"> <BR> $ mkdir platforms/unix/plugins/MyCoolPlugin <BR></FONT></TT> </DIV> </FONT> <P> would be the thing to do. (The following sections will refer to this directory as <TT>platdep</TT> since the full path is quite a mouthful of typing for my lazy fingers.) <P> <H2><A NAME="SECTION00041000000000000000"> 3.1 Plugin-specific configuration</A> </H2> <P> Your plugin can ask <TT>configure</TT><A NAME="173"></A> to run additional tests (and to set additional variables in its output files) simply by including a file called <TT>acinclude.m4</TT><A NAME="522"></A> in it's <TT>platdep</TT> directory. <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: The <TT>configure</TT><A NAME="523"></A> script is `compiled' from several other files. If you create a `<TT>platdep./acinclude.m4</TT>' file then you <I>must</I> `recompile'<A NAME="524"></A> <TT>configure</TT>. You can do this by `<TT>cd</TT>'ing to <TT>unix/config</TT> and running `<TT>make</TT>', or (if you have GNU <TT>make</TT>) from the <TT>blddir</TT> like this: <FONT COLOR="#ff0000"> <DIV ALIGN="LEFT"> <TT> <FONT COLOR="#ff0000"> <BR> $ make -C ../platforms/unix/config <BR></FONT></TT> </DIV> </FONT> </FONT></BLOCKQUOTE> <P> In addition to the usual <TT>autoconf</TT> macros, the following macros<A NAME="527"></A> are available specifically for Squeak plugins to use: <P> <H3><A NAME="SECTION00041100000000000000"> 3.1.1 <TT>AC_PLUGIN_CHECK_LIB(<I>lib</I>,<I>func</I>)</TT></A> </H3> <A NAME="529"></A> <P> This is similar to the <TT>autoconf</TT> `<TT>AC_CHECK_LIB</TT>' macro. <P> <I>func</I> is the name of a function required by the plugin, defined in the external (system) library <I>lib</I>. The macro checks that the library is available (via `<TT>-l<I>lib</I></TT>') and then adds it to the list of libraries required by the plugin (see the explanation of <TT>[plibs]</TT> in Section <A HREF="HowToBuildFromSource-node4.html#sec:plibs">3.2.1</A> for a description of how library dependencies for plugins are handled). <P> If <I>func</I> cannot be found in <I>lib</I> then the plugin will be disabled and a message to that effect printed during configuration. (The VM can still be built, <I>without</I> rerunning VMMaker or reconfiguring, and the plugin will simply be ommitted from it.) <P> <H3><A NAME="SECTION00041200000000000000"> 3.1.2 <TT>AC_PLUGIN_DEFINE_UNQUOTED(<I>keyword</I>,<I>text</I>)</TT></A> </H3> <P> This<A NAME="532"></A> is similar to the <TT>autoconf</TT> `<TT>AC_DEFINE_UNQUOTED</TT>' macro. <P> <I>keyword</I> is a <TT>Makefile</TT> keyword (usually of the form `[<I>name</I>]') and <I>text</I> is arbitrary text to be associated with it. Calling this macro causes <TT>mkmf</TT> to substitute <I>text</I> for all occurrences of <I>keyword</I> in the <TT>Makefile</TT> generated for the plugin. <P> <H3><A NAME="SECTION00041300000000000000"> 3.1.3 Plugin-specific variables</A> </H3> <P> The following variables are also set during the execution of a plugin-specific <TT>acinclude.m4</TT>: <P> <DL COMPACT> <DT></DT> <DD><TT>${plugin}</TT> is the name of the plugin; </DD> <DT></DT> <DD><TT>${topdir}</TT> is the path to the top-level directory (containing <TT>platforms</TT>); </DD> <DT></DT> <DD><TT>${vmmdir}</TT> is the path to the VMMaker `<TT>src</TT>' directory. </DD> </DL> <P> <H2><A NAME="SECTION00042000000000000000"> 3.2 Plugin-specific <TT>Makefile</TT> declarations and rules</A> </H2> <P> Three<A NAME="534"></A> mechanisms are avilable for this: <OL> <LI>scanning additional dirrectories for sources and headers; </LI> <LI>including a few additional lines into the default <TT>Makefile</TT>; and </LI> <LI>replacing entirely the default <TT>Makefile</TT> with a hand-written one. </LI> </OL> (The last option isn't as scary as it might sound: read on...) <P> <H3><A NAME="SECTION00042100000000000000"> 3.2.1 The anatomy of a plugin's <TT>Makefile</TT></A> </H3> <P> Before proceeding, let's take a minute to understand how Unix Squeak compiles and links files in its default <TT>Makefile</TT> for plugins. The default <TT>Makefile</TT><A NAME="536"></A><A NAME="537"></A> looks like this: <P> <BLOCKQUOTE> <BLOCKQUOTE> <FONT COLOR="#000000"> <DIV ALIGN="LEFT"> <TT> # default Makefile for Unix Squeak plugins <BR> <BR>[make_cfg] <BR>[make_plg] <BR> <BR> XINCLUDES = [includes] <BR> OBJS = [targets] <BR> TARGET = [target] <BR> PLIBS = [plibs] <BR> <BR>[make_inc] <BR> <BR>$(TARGET) : $(OBJS) Makefile <BR> $(LINK) $(TARGET) $(OBJS) $(PLIBS) <BR> <BR>[make_targets] <BR> <BR>.force : <BR></TT> </DIV> </FONT> </BLOCKQUOTE> </BLOCKQUOTE> <P> <BLOCKQUOTE> <FONT COLOR="#ff0000"> Note: The keywords<A NAME="541"></A> appearing between `<TT>[</TT> square brackets <TT>]</TT>' are substituted during configuration by a preprocessor called `<TT>mkmf</TT>'<A NAME="542"></A> according to the kind of plugin (internal/external) being built. </FONT></BLOCKQUOTE> <P> <TT><B>[make_cfg]</B></TT><A NAME="544"></A> <A NAME="545"></A> is the configured variable section. It contains the platform-specific information gleaned by <TT>configure</TT> while it was figuring out which compiler you have, what flags your linker needs, where to install stuff, and so on. <P> <TT><B>[make_plg]</B></TT><A NAME="547"></A> <A NAME="548"></A> contains a handful of definitions which depend on whether the plugin is being compiled as internal or external: <BLOCKQUOTE> <TABLE CELLPADDING=3> <TR><TD ALIGN="LEFT"><TT></TD><TD ALIGN="LEFT">o </TT></TD> <TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT">the extension for object files</TD> </TR> <TR><TD ALIGN="LEFT"><TT></TD><TD ALIGN="LEFT">a </TT></TD> <TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT">the extension for plugins</... [truncated message content] |