Follow this link to skip to the main content

Changes from YaM to YaM Lite

YAM.config

Because the new YaM Lite does not use link modules, the new YAM.config adopts several simplifications. There are no WORK_MODULES, LINK_MODULES, PACKAGES or SUBPACKAGES in YAM.config. Packages are replace by the automated module dependency functionality. Work modules are now called MODULES. There are no changes to the BRANCH_module_name entries.

Here is an example of a mapping from an old YAM.config to a new YAM.config

Old YAM.config

# YAM.config - configuration file for yam utilities and makefiles
# created Fri May 27 10:48:14 2005 for nesnas
#
# Edit this file to suit your needs.  Lines that end with backslash
# get spliced together.

WORK_MODULES =  SiteDefs \
                arrays \
                data_io \
                matrices \
                points \
                share \
                transforms

LINK_MODULES = 

BRANCH_SiteDefs           =     main
BRANCH_arrays             =     main
BRANCH_data_io            =     main
BRANCH_matrices           =     main
BRANCH_points             =     main
BRANCH_share              =     main
BRANCH_transforms         =     main

# Below is a list of variables that can be set:
#
# WORK_MODULES   - yam modules to checkout from CVS for editing/compilation
# LINK_MODULES   - yam modules to link to
# BRANCH_workmod - specify tag and branch tag to use for checking out
#                  work module "workmod" and possibly branching from it
#
# The default directory to find LINK_MODULES is in:
# /afs/jpl.nasa.gov/group/claraty/private/YaM-CLARAty/Module-Releases
#
# Each entry in WORK_MODULES may have a corresponding variable specifying
# CVS branch options.  These variables are named BRANCH_workmod, where
# "workmod" is the name of the desired work module (such as BRANCH_Dshell).
#
# The BRANCH_module variables is set to:
#    <tagName> <branchSuffix>
# <tagName> is the tag for the version you want to branch off of, and
# hyphen-<branchSuffix> is appended to the tag for the branch you want to
# create.  For example,
#     BRANCH_Dshell = Dshell-R1-05 jeffb
# makes branch "Dshell-R1-05-jeffb" off of tagged version "Dshell-R1-05"
# for work module Dshell.
#
# If <branchSuffix> is not specified, then just checkout version <tagName>,
# without creating a branch from it.
#
# There is a special <tagName> "main" which specifies CVS's current
# main branch.  You cannot branch off of "main".
#
# It is an error if <tagName> does not exist.  Use <branchSuffix> to
# create a new branch.
#
# If BRANCH_module is not specified at all for a given work module,
# the default action is to branch off the latest release appending
# hyphen-login for the branch name.  So if the latest version of Dshell
# is Dshell-R1-05 , then branch tag might default to Dshell-R1-05-jeffb .

The new YAM.config

#-----------------------------------------------------------------------------
# YAM.config - configuration file for yam utilities and makefiles
# Created Thu Dec  1 22:25:57 2005 for nesnas
#
# Edit this file to suit your needs.  Lines that end with backslash
# get spliced together.
#-----------------------------------------------------------------------------

MODULES =       arrays \
                data_io \
                make \
                matrices \
                points \
                share \
                transforms

BRANCH_arrays                            = main
BRANCH_data_io                           = main
BRANCH_make                              = main
BRANCH_matrices                          = main
BRANCH_points                            = main
BRANCH_share                             = main
BRANCH_transforms                        = main

#-----------------------------------------------------------------------------
# Below is a list of variables that can be set:
#
# MODULES       - yam modules to checkout from CVS for editing/compilation
# BRANCH_module - specify tag and branch tag to use for checking out
#                 modules and possibly branching from it
#
# Each entry in MODULES may have a corresponding variable specifying
# CVS branch options.  These variables are named BRANCH_module, where
# "module" is the name of the desired work module (such as BRANCH_share).
#
# The BRANCH_module variables is set to: <tagName> <branchSuffix>
#     <tag>       is the tag for the version you want to branch off of, and
#                 hyphen-<branchSuffix> is appended to the tag for the branch 
#                 you want to create.  
#                 For example, BRANCH_share = share-R1-05 fix
#                 makes branch "share-R1-05-fix" off of tagged version 
#                 "share-R1-05" for module "share".
#                 There is a special <tagName> "main" which specifies 
#                 CVS's current main branch.  You cannot branch off of "main".
#
#   <branch>      if is not specified, then just checkout version <tag>,
#                 without creating a branch from it.
#                 It is an error if <tag> does not exist.  Use <branch>
#                 to create a new branch.
#
#-----------------------------------------------------------------------------

		

Makefile

Here is an example of a mapping from an old Makefile.yam and the new Makefile

Old Makefile

# -*-makefile-*-
# Makefile.yam for "bits" module
#
# This Makefile is used by YAM scripts to build and link a module.
# It should have targets for:
#     yam-mklinks links depends libs libsso bins clean
# even if some are no-ops.
#
#-----------------------------------------------------------------------
# include in the site's flags, rule definitions
ifndef YAM_ROOT
LOCAL_YAM_ROOT = ../../
else
LOCAL_YAM_ROOT = $(YAM_ROOT)
endif

include $(LOCAL_YAM_ROOT)/etc/SiteDefs/mkHome/shared/overall.mk

#-----------------------------------------------------------------------
#--------------[[ Customize Links, Sources & Libraries ]]---------------

PROJECT  =    libpoint
DEP_MODULES = share
BIN_SRCS =    test_point.cc            \
              test_point_2d.cc         \ 
              test_point_con.cc        \
              utest_point.cc           \

LIB_SRCS =    point_templates.cc       \
              point_2d_templates.cc    \

# Link with the following libraries (dependencies)
CLARATY_LIBS = -ldata_io -lshare
EXTRA_LIBS   =

# Install the following links
INC_DIR   = claraty
INC_LINKS = point_t.h                  \
            point_2d_t.h               \
            point_io.h                 \
            point_2d_io.h              \
            point_limits.h             \
            point_2d_limits.h          \
            bbox.h bbox_2d.h

BIN_TARGET_LINKS = $(BIN_SRCS:%.cc=$(YAM_TARGET)/%)
LIB_TARGET_LINKS = $(YAM_TARGET)/$(PROJECT).a

#-----------------------------------------------------------------------
# If USE_CPPUNIT is set, make cppunit tests

#ifdef USE_CPPUNIT
INC_LINKS += utest_point.h
BIN_SRCS += utest_point.cc
include $(LOCAL_YAM_ROOT)/etc/SiteDefs/cppunit.mk
#endif

#-----------------------------------------------------------------------
# include the make rules for claraty

include $(LOCAL_YAM_ROOT)/etc/SiteDefs/claraty.mk
#-----------------------------------------------------------------------

New Makefile

Changes include no CLARATY_LIBS which are auto-generated, and unit regression test files are listed separately under TEST_SRCS. The conditinal inclusion of CPPUnit is done global.

#-----------------------------------------------------------------------
# @Makefile
#-----------------------------------------------------------------------

LIB_SRCS =      point_templates.cc       \ 
                point_2d_templates.cc  

BIN_SRCS =      demo_point.cc            \
                demo_point_2d.cc         \  
                demo_point_con.cc 

TEST_SRCS =     utest_point.cc          \
                utest_point_2d.cc     

INC_DIR =       claraty
INC_LINKS =     point_t.h               \
                point_2d_t.h            \
                point_io.h              \
                point_2d_io.h           \
                point_limits.h          \
                point_2d_limits.h       \
                bbox.h                  \
                bbox_2d.h

include ../make/makefile/module.mk