]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Allow custom platform families
authorR. Steve McKown <rsmckown@gmail.com>
Wed, 21 Mar 2012 14:50:47 +0000 (08:50 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Jul 2012 16:34:43 +0000 (10:34 -0600)
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

index 2f1b5b999ddeef0c4d91c2bc6bd3246cb016e837..2f61d921400ce5f896b6b7aeb4f5d6b2b6e3db80 100644 (file)
@@ -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;
     }
 }