Upload
samantha-charles
View
212
Download
0
Embed Size (px)
Citation preview
Tutorial build
• Main ideas– Reuse as much previously obtained
configuration information as possible: from Babel, cca-spec-babel, etc.
– Extract all irrelevant (from the user’s point of view) makefile details into a few templates and top-level makefiles
User point of view
• To add a new port and/or component– Place sidl definitions in ports/sidl/ or components/sidl/
for ports/components, respectively– For components, edit
components/MakeIncl.components, specifying the fully qualified component name and implementation language, e.g., integrators.MonteCarlo-f90
– Type ‘make’:• XML generated and placed in xml_repository, port libraries
built, server code generated with Babel and placed in directories corresponding to package hierarchy, dynamic and static server libraries built
Tutorial build
• Directory structure:
src
ports components legacy xml_repository utils
sidl package dirs sidl package dirs
• Deployment:– install targets following toolkit conventions– tutorial-specific: student source tree creation
Makefiles
• Top-level simple configure (in src)– All Babel- and component-related configuration
information reused from the Babel and cca-spec-babel configurations
• Top-level makefile• Independent makefiles in port, component, and
legacy subdirectories• Makefile templates for building and installing
– Port libraries– Component libraries and associated metadata(port & component makefile templates are very similar)
Deficiencies
• Rather rigid directory structure; not much flexibility in organization (e.g., configure only at top level)
• Small, but annoying differences in SIDLXML processing for ports and components
• More common data can be extracted, e.g., from client and server makefile templates
• Required separation of ports and components SIDL packages.
• External dependencies must be added manually to 1. configure2. MakeIncl.user for each component
• Helper scripts collection in utils/ is pretty haphazard• More…
Things that will help
• Sniffing through the SIDL XML to discover what package component/port and whether it meets some sanity checks.– No longer require component and port to be in
separate packages.– Better chance of doing the auto-install targets
correctly
• Less of this -->
Eliminate Boyana Hack-Magic
• Less of this:#### Set path in RC files for the various tasks#### The wack-o sed command is necessary to escape the "/" in directories.#### Believe me, it works. Don't mess with it!tasks: @-echo -e "\n#### Creating Ccaffeine RC scripts for tutorial hands-on tasks"; \ escaped_dir=`echo $(LIB_DIR) | sed "s/\//\\\\\\\\\\\//g"` ;\ tasks="`ls examples/*.incl`"; \ for taskrc in $$tasks ; do \ newname="`echo $$taskrc | sed -e 's|\.incl||'`"; \ sed s/@CCA_COMPONENT_PATH@/$$escaped_dir/ $$taskrc > $$newname ; \ done
Overlays in the Tutorial Src Tree
Rob Armstrong
Take a hint from the Apache2 and Linux Modules Config
• Linux Kernel Modules– Dir /etc/modules.d
• Each file in that dir is interpreted as an autonomous configuration file:
• Typing “modules-update” picks up the info in modules.d and puts it in the operative /etc/modules.conf.
capt-january$ ls /etc/modules.d#thinkpad# alsa cdma-card i386 svgalib thinkpad~aliases alsa~ cdma-card~ ppp thinkpad xfree-drmcapt-january$
Take a hint from the Apache2 and Linux Modules Config
• Apache2 has a similar augmentable config directory:
– Here apache “sources” all of these as startup, there is no need for a second config file that combines these.
capt-january$ ls /etc/apache2/conf/modules.d/00_apache_manual.conf 41_mod_ssl.default-vhost.conf 70_mod_php.conf20_mod_ruby.conf 45_mod_dav.conf40_mod_ssl.conf 47_mod_dav_svn.confcapt-january$
Tutorial-src would work in much the same way
• MakeIncl.user, components/Makeincl.components, become directories with separable files that provide config info.
• Advantage of placing components' source code in there is unclear, – probably not necessary if the config is detailed
enough.
What it would look like.
• Each component would have its individual config file:
• The build system would source these individual files to determine where and how to build the components.– Advantage: extensible– The config directives can become richer over
time but default to the ones we have now.
capt-january$ ls components/config.d/Function_F90 Integrator_CXX MyComponent_PYcapt-january$