I do not think it is a SDCC problem. It is a make issue. Probably make will 
interpret %.d files as intermediate files, and it deletes them by default. If 
you put .d files in the PRECIOUS target, make will preserve them.

PRECIOUS: %.d

See the gnu make manual for more information at:

http://www.gnu.org/software/make/manual/make.html#Special-Targets




--- El jue, 15/1/09, Kustaa Nyholm <[email protected]> escribió:

> De: Kustaa Nyholm <[email protected]>
> Asunto: [Sdcc-user]  SDCC deleted .d files?
> Para: [email protected]
> Fecha: jueves, 15 enero, 2009 8:13
> What am I missing here?
> 
> Yesterday, after learning that t SDCC supports -M option
> I tried to create dependency rules automatically as per gnu
> make manual
> suggests:
> 
> %.d: %.c  
>        @set -e; rm -f $@; \
>         $(SDCC) -c -M $(SDCCFLAGS) $< > $...@.$$$$; \
>         sed 's,\($*\)\.o[ :]*,\1.o $@ :
> ,g' < $...@.$$$$ > $@; \
>     rm -f $...@.$$$$
> 
> But I seemed to have some weird build issues.
> 
> After some tracking it seems that SDCC deletes file
> 'X.d' if I specify
> output file with '-o X.o' 
> 
> Is this how it should work? Is this different from gcc? If
> so is it a
> bug or feature?
> 
> Of course working around this is trivial (use some other
> extension than
> .d) but I'd like to understand this.
> 
> br Kusti
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user


      

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to