[ECOS] Makefile rule and dependencies problem
Tue Aug 22 14:22:00 GMT 2000
> -----Original Message-----
> From: Jonathan Larmour [ mailto:email@example.com ]
> Subject: Re: [ECOS] Makefile rule and dependencies problem
> Fabrice Gautier wrote:
> > Unfortunately, the two following lines:
> > @echo $@ ':' $< '\' > $@
> > @tail +2 $(@:.o.d=.tmp) >> $@
> > assume that the first dependency line generated by gcc
> contains only one the
> > .c file dependency. So it would work for something like:
> > file.o : file.c \
> > file1.h \
> > file2.h
> > but not if the generated depends is like:
> > file.o : file.c file1.h file2.h
> > Don't know how to correct that however.
> Are you saying that you have a gcc that produces dependencies
> in this form?
Yes basically, that's what I witnessed.
In fact I used this rule for my own Makefile and for one file named os.cpp I
get the following first line :
os.o: os.cpp os.h \
So applying the rule the depend on my os.h disapear.
However I've not checked if any of the eCos file is subject to that. I think
this only occur if the filename and the first include filename are short
enough. And I think that in the eCos case this may not occur often because
the include filename are expamded to the full path and so are quite long (In
my case the "os.h" include file was in the same directory than the source
file this is why it is not expanded)
But as sometime I had to do a "clean" in order to rebuild correctly eCos,
maybe this problem is real.
> If so, which version?
$ i386-elf-gcc --version
(the one patched for eCos)
More information about the Ecos-discuss