X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tools%2Ftinyos%2Fncc%2Fncc.in;fp=tools%2Ftinyos%2Fncc%2Fncc.in;h=b1fee5cec0c51ee8ec6bafcf3759295c7d93471c;hb=c62b18891808f1958e9e04708f91c5ea6fb2c765;hp=2f1b5b999ddeef0c4d91c2bc6bd3246cb016e837;hpb=d4339168075e5b8367972937a71f9665ff3cc4f0;p=tinyos-2.x.git diff --git a/tools/tinyos/ncc/ncc.in b/tools/tinyos/ncc/ncc.in index 2f1b5b99..b1fee5ce 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; } } @@ -224,7 +233,11 @@ $platform_dir = $platform_def; $platform_dir =~ s!/\.platform$!!; push @includes, $platform_dir unless $nostdinc; do $platform_def; -do $family_def if -f $family_def; +if (-f $family_def) { + $family_dir = $family_def; + $family_dir =~ s!/\.family$!!; + do $family_def +} unshift @new_args, "-DPLATFORM_\U$target"; push @new_args, @opts; @@ -291,6 +304,7 @@ sub idir_subst { $rep = $TOSDIR if $char eq "T"; $rep = $target if $char eq "p"; $rep = $platform_dir if $char eq "P"; + $rep = $family_dir if $char eq "F"; &fail("unknown include-path substitution %" . $char) if !$rep; substr($idir, $idx, 2) = $rep; $idx += length $rep;