This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Makefile rule and dependencies problem
- To: 'Jonathan Larmour' <jlarmour at redhat dot co dot uk>
- Subject: RE: [ECOS] Makefile rule and dependencies problem
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Tue, 22 Aug 2000 14:20:18 -0700
- Cc: "Ecos-List (E-mail)" <ecos-discuss at sourceware dot cygnus dot com>
> -----Original Message-----
> From: Jonathan Larmour [mailto:jlarmour@redhat.co.uk]
> 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
2.95.2
(the one patched for eCos)
Thanks
--
Fabrice Gautier
fabrice_gautier@sdesigns.com