This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RedBoot: how to display correct build date/time?


On Mon, Feb 26, 2001 at 11:50:09AM -0600, Grant Edwards wrote:

> I'm trying to figure out how to get RedBoot to display the
> build date/time.  It currently displays the date/time that
> main.c was compiled.  If I'm not making changes to main.c, then
> the date/time in main.c is not really "current".

Uh, wait -- it looks like main.c is supposed to be re-compiled
any time anything in libtarget.a changes:

        make -priority 320 {
            <PREFIX>/bin/redboot.elf : $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/$
                    @sh -c "mkdir -p $(dir $@)"
                    $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ main.o
        }
        make -priority 319 {
           main.o: $(REPOSITORY)/$(PACKAGE)/src/main.c $(PREFIX)/lib/libtarget.a
             $(CC) -c $(INCLUDE_PATH) $(CFLAGS) -o main.o $(REPOSITORY)/$(PACKAGE)/src/main.c

The problem is that when stuff in libextras.a changes, it
doesn't generate a re-compile of main.c (updating the build
date/time).  Adding $(PREFIX)/lib/libextras.a to the prereq's
for main.o makes it work the way I wanted.

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]