Menu

#261 exe0: make target missing dependency on $(COMPONENT).nc

v2.0
open
5
2010-03-09
2009-11-19
Till Maas
No

The exe0: target uses $(COMPONENT).nc as input for ncc, but there is no dependency for it. Adding this to the makerules file should fix it:
exe0: $(COMPONENT).nc

This is needed in case I want to configure a component first externally, e.g. via a substitution in a $(COMPONENT).nc.in file to create the file itself. Without the dependency, the file won't be created.

Discussion

  • Vlado Handziski

    Vlado Handziski - 2010-03-09

    Can you provide more input on this? The only existing dependency for exe0 is the build_storage which prepares the volumes for the flash abstractions.

     
  • Vlado Handziski

    Vlado Handziski - 2010-03-09
    • assigned_to: nobody --> klueska
     
  • Till Maas

    Till Maas - 2010-03-25

    Consider this example Makefile:

    DEMO_VAR ?= 1234
    DemoAppC.nc: DemoAppC.nc.in
    sed -e 's/@DEMO_VAR@/$(DEMO_VAR)/' <$< >$@

    COMPONENT=DemoAppC
    include $(MAKERULES)

    This allows to use "make telosb DEMO_VAR=456" to create a DemoAppC.nc file with the @DEMO_VAR@from DemoAppC.nc.in substituted. But this does not work, because the "exe0" target which runs nesc and used $(COMPONENT).nc does not have $(COMPONENT).nc as it's dependency.

    This can be accomplished by adding this line to my local Makefile:
    exe0: $(COMPONENT).nc

    But since this dependency is always valid, because it is used within the exe0 commands, this could be added somewhere in the tinyos makefiles. I am not sure, what's the best place to add this, because I am not that familiar with the structure of the tinyos makefiles.

     
  • Till Maas

    Till Maas - 2010-03-29

    This dependency has been added in this commit:
    http://github.com/tyll/tinyos-2.x/commit/6d1bc578ebe049a2428ad260f83c88c42ff4d8c2

    But it also introduced a fake rule for $(COMPONENT).nc that breaks my intended usage, because it will always makes make fail if $(COMPONENT).nc does not exist, even if I provide a rule for this in my Makefile

     
MongoDB Logo MongoDB