Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial build Main ideas –Reuse as much previously obtained configuration information as possible: from Babel, cca-spec-babel, etc. –Extract all irrelevant.

Similar presentations


Presentation on theme: "Tutorial build Main ideas –Reuse as much previously obtained configuration information as possible: from Babel, cca-spec-babel, etc. –Extract all irrelevant."— Presentation transcript:

1 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

2 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

3 Tutorial build Directory structure: src portscomponentslegacyxml_repositoryutils sidlpackage dirssidlpackage dirs Deployment: –install targets following toolkit conventions –tutorial-specific: student source tree creation

4 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)

5 Deficiencies Rather rigid directory structure; not much flexibility in organization (e.g., configure only at top level) Small, but annoying differences in SIDL  XML 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.configure 2.MakeIncl.user for each component Helper scripts collection in utils/ is pretty haphazard More…

6 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 -->

7 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

8 Overlays in the Tutorial Src Tree Rob Armstrong

9 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-drm capt-january$

10 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.conf 20_mod_ruby.conf 45_mod_dav.conf 40_mod_ssl.conf 47_mod_dav_svn.conf capt-january$

11 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.

12 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_PY capt-january$


Download ppt "Tutorial build Main ideas –Reuse as much previously obtained configuration information as possible: from Babel, cca-spec-babel, etc. –Extract all irrelevant."

Similar presentations


Ads by Google