This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Determine target/template at compile time
> ecos.db is documented @
> http://ecos.sourceware.org/docs-latest/cdl-guide/language.database.html
I had found that, but all it documents is the 'package'
command. I couldn't find anything about the 'target' command.
> There is no mechanism for determining the current template at
> compile time because that does not actually make sense.
I came to the same conclusion after a while.
> Detecting the current target is normally done by #include'ing
><pkgconf/system.h> and looking for specific platform HAL
>packages, e.g.:
>
> #include <pkgconf/system.h>
> #if defined(HAL_M68K_M5272EVB)
> ... do one thing ...
> #elif defined(HAL_M68K_M5282LITE)
> ... do something else ...
> #else
> # error This code is not supported on the current platform.
> #endif
Thanks. That's more along the lines of what I'm going to end
up doing.
It turns out there's a chunk of stuff that really needs to be
in a separate package anyway, so the right thing to do is to
check for that package.
--
Grant Edwards grante Yow! Awright, which one of
at you hid my PENIS ENVY?
visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss