From 71f2849fb56e837bb00300f31cce4e1f73d5cbf1 Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Wed, 21 Mar 2012 08:50:47 -0600 Subject: [PATCH] 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. --- tools/tinyos/ncc/ncc.in | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } } -- 2.39.2