[Tinyos Core WG] Testing apps

Jan Hauer hauer at tkn.tu-berlin.de
Wed Jun 18 08:35:04 PDT 2008


> This affected attempts to build all apps across all platforms (i.e.,
> make in the apps directory) only, but I suspect the right amount of
> make magic could automate rejecting make attempts when PLATFORMS is
> set. Any volunteer? (this would be simpler and clearer than repeating
> appropriate ifneq's in a bunch of Makefiles)

see below - do we want to add this to Makerules ?
Jan

# checks whether the target platform is supported by the application;
# the application Makefile can define PLATFORMS as a whitespace-separated
# list of supported platforms
ifneq ($(PLATFORMS),)
  ifeq ($(strip $(foreach platform,$(PLATFORMS),$(findstring
$(platform),$(PLATFORM)))),)
    $(error The target platform is not supported by this application -
supported platforms are: $(PLATFORMS))
  endif
endif



On Tue, Jun 17, 2008 at 10:23 PM, David Gay <dgay42 at gmail.com> wrote:
> On Tue, Jun 17, 2008 at 9:17 AM, Kevin Klues <klueska at gmail.com> wrote:
>> In case its of interest, I've been adding a line like the following to
>> my application makefiles that are only meant to be used by a
>> particular platform so that compiling for an unsupported platform
>> doesn't just puke on you.  This might make sense to add to the tkn154
>> test apps.
>>
>> ifneq ($(filter telosb tmote clean,$(MAKECMDGOALS)),)
>>  include $(MAKERULES)
>> else
>> %:
>>        @echo "    Sorry, this application is only written to work
>> with telos based motes equipped with onboard sensors.."
>> endif
>>
>
> FWIW, we did use to ocasionally write:
> PLATFORMS = <names of supported platforms>
>
> This affected attempts to build all apps across all platforms (i.e.,
> make in the apps directory) only, but I suspect the right amount of
> make magic could automate rejecting make attempts when PLATFORMS is
> set. Any volunteer? (this would be simpler and clearer than repeating
> appropriate ifneq's in a bunch of Makefiles)
>
> David
>


More information about the Tinyos-2.0wg mailing list