If nesc doesn't support an option, it passes it on to avr-gcc.  Thus if
you're doing -include file.nc then avr-gcc would just get confused and
ignore it.  If you're doing -include file.h, then it makes a bit more
sense.  So basically nesc supports -I internally and passes -include
options to avr-gcc.

-Joe

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mads
Bondo Dydensborg
Sent: Tuesday, August 19, 2003 12:37 AM
To: Joe Polastre
Cc: [EMAIL PROTECTED]
Subject: RE: [Tinyos-users] Does ncc support the -include option?

On Fri, 15 Aug 2003, Joe Polastre wrote:

> Yes.
>
> -I<path>

Ehm. I may be mistaken here, but my impression from working with gcc
over
the years is that -I setup the include path for the preprocessor for
directories to search. While this is most usefull, what I specifically
am
asking about is the -include option for the preprocessor, that is
described like this in info gcc:

       -include file
           Process file as if "#include "file"" appeared as the first
line of
           the primary source file.  However, the first directory
searched for
           file is the preprocessor's working directory instead of the
direc-
           tory containing the main source file.  If not found there, it
is
           searched for in the remainder of the "#include "..."" search
chain
           as normal.

           If multiple -include options are given, the files are
included in
           the order they appear on the command line.

I have tried to pass this to nesc both as -include file and as
-Wp,-include and -Wp,include but so far, the file I wish to include does
not get included.

For a normal gcc, -include <absolute-path/file> actually works like a
charm, but I have trouble making nesc work as expected.

The reason I am trying this, is to include a file that defines a few
extra macros when building nido/tossim, without changing the tinyos
tree.
I can do this by changing the -I<> orders but this may break expected
behaviour in other cases.

Any help greatly appreciated, thanks

Mads

>
> -Joe
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
Mads
> Bondo Dydensborg
> Sent: Friday, August 15, 2003 6:05 AM
> To: [EMAIL PROTECTED]
> Subject: [Tinyos-users] Does ncc support the -include option?
>
> Hi there
>
> Does anyone know if ncc supports the -include option?
>
> I am trying to get ncc to include a specific file that is outside the
> tos
> tree, without altering the tos tree. Any suggetions on how to do this
> is very welcome.
>
> Thanks,
>
> Mads
>
>

-- 
+----------------------------------------------------------------------+
|  Mads Bondo Dydensborg.               http://www.distlab.dk/madsdyd/ |
|  +45 35 32 14 18                                                     |
+----------------------------------------------------------------------+
_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to