Can I force compilation of a file every build? - VxWorks

This is a discussion on Can I force compilation of a file every build? - VxWorks ; What I want to achieve is use of __DATE__ and __TIME__ related to the build time but what if the file they're in hasn't changed? Is there anything I can do to force the file to be recompiled every time ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Can I force compilation of a file every build?

  1. Can I force compilation of a file every build?


    What I want to achieve is use of __DATE__ and __TIME__ related to the
    build time but what if the file they're in hasn't changed? Is there
    anything I can do to force the file to be recompiled every time I build?

    I'd like to do this automatically (rather than have to 'touch' the
    source file or compile it by hand every time).

    Thanks for any help,
    G$.


    --
    Fenster

  2. Re: Can I force compilation of a file every build?



    Hi Fenster,

    I use vxworks 5.3, to force a 'clean' before I start building I just
    use a batch file to delete all the object files (.o .out etc)

    (and I invoke the compiler from the command line too, so my build is
    fully automated from the batch file, means I never have to go anywhere
    near Tornado which suits me )

    OO.


    On 21 Feb, 08:26, Fenster wrote:
    > What I want to achieve is use of __DATE__ and __TIME__ related to the
    > build time but what if the file they're in hasn't changed? Is there
    > anything I can do to force the file to be recompiled every time I build?
    >
    > I'd like to do this automatically (rather than have to 'touch' the
    > source file or compile it by hand every time).
    >
    > Thanks for any help,
    > G$.
    >
    > --
    > Fenster




  3. Re: Can I force compilation of a file every build?

    On Feb 21, 12:26 am, Fenster wrote:
    > What I want to achieve is use of __DATE__ and __TIME__ related to the
    > build time but what if the file they're in hasn't changed? Is there
    > anything I can do to force the file to be recompiled every time I build?
    >
    > I'd like to do this automatically (rather than have to 'touch' the
    > source file or compile it by hand every time).
    >
    > Thanks for any help,
    > G$.
    >
    > --
    > Fenster


    You can do this right in your make file by either adding a line to the
    target, such as:

    target:
    rm foo.o
    $(LD) -r -o traget $(OBJECTS)

    or better yet, use the clean target and add that as a dependancy:

    target: clean
    $(LD) -r -o traget $(OBJECTS)

    Have fun!
    Rick


  4. Re: Can I force compilation of a file every build?

    In message <1172174319.477953.141190@s48g2000cws.googlegroups. com>,
    rhunnicutt@netzero.com writes
    >On Feb 21, 12:26 am, Fenster wrote:
    >> What I want to achieve is use of __DATE__ and __TIME__ related to the
    >> build time but what if the file they're in hasn't changed? Is there
    >> anything I can do to force the file to be recompiled every time I build?
    >>
    >> I'd like to do this automatically (rather than have to 'touch' the
    >> source file or compile it by hand every time).
    >>
    >> Thanks for any help,
    >> G$.
    >>
    >> --
    >> Fenster

    >
    >You can do this right in your make file by either adding a line to the
    >target, such as:
    >
    >target:
    > rm foo.o
    > $(LD) -r -o traget $(OBJECTS)
    >
    >or better yet, use the clean target and add that as a dependancy:
    >
    >target: clean
    > $(LD) -r -o traget $(OBJECTS)
    >
    >Have fun!
    >Rick
    >


    Thanks for that but doesn't the make file get generated automatically
    and wouldn't that "erase" this modification?

    I discovered the POST_BUILD_RULE macro which I have set up to erase
    foo.o. This seems to accomplish what I'm after, I'm just not convinced
    that it's the best way to go. Maybe I should get out more, and worry
    less.


    --
    Fenster

  5. Re: Can I force compilation of a file every build?

    On Feb 22, 11:47 pm, Fenster wrote:
    > In message <1172174319.477953.141...@s48g2000cws.googlegroups. com>,
    > rhunnic...@netzero.com writes
    >
    >
    >
    >
    >
    > >On Feb 21, 12:26 am, Fenster wrote:
    > >> What I want to achieve is use of __DATE__ and __TIME__ related to the
    > >> build time but what if the file they're in hasn't changed? Is there
    > >> anything I can do to force the file to be recompiled every time I build?

    >
    > >> I'd like to do this automatically (rather than have to 'touch' the
    > >> source file or compile it by hand every time).

    >
    > >> Thanks for any help,
    > >> G$.

    >
    > >> --
    > >> Fenster

    >
    > >You can do this right in your make file by either adding a line to the
    > >target, such as:

    >
    > >target:
    > > rm foo.o
    > > $(LD) -r -o traget $(OBJECTS)

    >
    > >or better yet, use the clean target and add that as a dependancy:

    >
    > >target: clean
    > > $(LD) -r -o traget $(OBJECTS)

    >
    > >Have fun!
    > >Rick

    >
    > Thanks for that but doesn't the make file get generated automatically
    > and wouldn't that "erase" this modification?
    >
    > I discovered the POST_BUILD_RULE macro which I have set up to erase
    > foo.o. This seems to accomplish what I'm after, I'm just not convinced
    > that it's the best way to go. Maybe I should get out more, and worry
    > less.
    >
    > --
    > Fenster- Hide quoted text -
    >
    > - Show quoted text -


    You must be building using tornado to have the makefiles gernerated
    automatically? I'm a command line guy so that hasn't been an issue for
    me. I believe you can turn that option off and there should be a way
    to specify the dependancies in the tool but not sure where.

    Sorry I couldn't be more help..

    Rick


+ Reply to Thread