Home
Education Page
Description
Schedule
Slides
Assignments
Projects
Reviews
Literature
Center
Master Program
Center
Home
Courses
People
Projects
Page
Edit Page
Rename Page
Attach File
Printable
Wiki Source
More ...
Web
Recent Changes
Notify Service
News
Page Index
Search
More ...
Wiki
About TWiki
Text Formatting
Registration
Change Password
Reset Password
Users
Groups
Log In
or
Register
Learn Automake
Swe03
In these exercises you learn to use the Makefile abstractions provided by automake applied to the interpreter package. Make a new version of the package to do these exercises with (i.e., make a tag for the trunk after finishing LearnAutoconf.) Online documentation for automake is available in the info pages (command =info automake=). A simple example of the use of automake is provided in the following package: * [[http://www.cs.uu.nl/docs/vakken/swe/software/hello-4.0.tar.gz][hello-4.0.tar.gz]] Unpack and build it using the following commands: <verbatim> gtar zxf hello-4.0.tar.gz cd hello-4.0 ./reconf ./configure --prefix=/tmp/hello-4.0 make make install make dist make rpm </verbatim> Study the files in the package to see how automake is used. Note that the Makefile.in is generated from Makefile.am and that routine targets for deployment (install, dist, ...) are now generated by automake from declarations. Have a look at Makefile.in to get an impression of the complexity of a complete Makefile.in. The reconf script calls the relevant autotools. The hello.spec file for RPM uses variables to refer to the installation target directories to make it more generic. ----+++ Exercises Now change the interpreter package to make use of automake. <ol> <li> Extend =configure.in= to use automake (=AM_INIT_AUTOMAKE=). </li> <li> Promote the =Makefile.in= from the previous exercise to a =Makefile.am=. Make use of automake macro definitions such as for =bin_PROGRAMS= to abbreviate the =Makefile=. </li> <li> Remove the =dist=, =install=, =uninstall=, and =clean= targets and make sure that they are generated by automake. <li> (Optional.) Turn the package into a hierarchical directory structure with =src/=, =doc/=, and =config/= subdirectories. Distribute the code over the subdirectories as appropriate. Extend the configure.in and Makefile.am to support the new structure. </ol>