From: R. Steve McKown Date: Wed, 21 Mar 2012 14:50:47 +0000 (-0600) Subject: Allow custom platform families X-Git-Tag: patchset/2.1.1-4.5~3 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=71f2849fb56e837bb00300f31cce4e1f73d5cbf1 Allow custom platform families ncc can find a custom platform if its PLATFORMDIR is included into PFLAGS as an include: -I$(PLATFORMDIR) or equivalent. Teach ncc to identify when such a platform is a family member and in such cases process the corresponding .family file. --- diff --git a/tools/tinyos/ncc/ncc.in b/tools/tinyos/ncc/ncc.in index 2f1b5b99..2f61d921 100644 --- a/tools/tinyos/ncc/ncc.in +++ b/tools/tinyos/ncc/ncc.in @@ -148,6 +148,15 @@ if ($print_target) { foreach $dir (@includes) { if ($dir =~ m!/$target/?$! && -f "$dir/.platform") { $platform_def = "$dir/.platform"; + # Check to see if the platform is a member of a family + if (-f "$dir/.family") { + $family_def = "$dir/.family"; + } + else { + if (-f "$dir/../.family") { + $family_def = "$dir/../.family"; + } + } last; } }