From: R. Steve McKown Date: Wed, 21 Mar 2012 15:27:48 +0000 (-0600) Subject: Support %F substitution for @includes X-Git-Tag: patchset/2.1.1-4.5~2 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=5aa4581b60d743142f85f0e27e0e3d541c83b084 Support %F substitution for @includes .platform and .family files can use %F when adding to includes. %F is replaced with the family dir at build time. --- diff --git a/tools/tinyos/ncc/ncc.in b/tools/tinyos/ncc/ncc.in index 2f61d921..b1fee5ce 100644 --- a/tools/tinyos/ncc/ncc.in +++ b/tools/tinyos/ncc/ncc.in @@ -233,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; @@ -300,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;