automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dependencies: non-standard path to system headers


From: Ineiev
Subject: Dependencies: non-standard path to system headers
Date: Tue, 1 Jul 2008 06:12:15 +0000 (GMT)

Some time ago I tested build process of my project on
cygwin. Some parts of the project are AVR-hosted, so
I checked if WinAVR were capable to build them.

WinAVR gcc produces dependencies that shall confuse `make',
like these:

sampler.o: ../../../stribog/sw/auxilia/coil/sampler.c \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/io.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/sfr_defs.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/inttypes.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/stdint.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/iom8.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/portpins.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/common.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/version.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/fuse.h \
  c:/winavr-20080512/lib/gcc/../../avr/include/avr/lock.h

c:/winavr-20080512/lib/gcc/../../avr/include/avr/io.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/sfr_defs.h:

c:/winavr-20080512/lib/gcc/../../avr/include/inttypes.h:

c:/winavr-20080512/lib/gcc/../../avr/include/stdint.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/iom8.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/portpins.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/common.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/version.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/fuse.h:

c:/winavr-20080512/lib/gcc/../../avr/include/avr/lock.h:

The most obvious is to use --disable-dependency-tracking.
It works, however this means that WinAVR can just build
the project, but they are not convenient to use when
modifying the sources.

WinAVR is the most active AVR-targeted GNU toolchains branch,
it would be nice if the project could use WinAVR without
restrictions. WinAVR toolchain can probably be built
from sources on cygwin, but they don't release the sources
in a tarball, just installer executables. To build them
I need to checkout CVS, apply the patches to mainstream
binutils and gcc, configure and make them. This is much
more complicated, and I also thought Autotools exist
to make projects build with the tools available.

On the other hand, after I sed -i "s/\<-MD\>/-MMD/" Makefile,
gcc does not track internal headers (which are not likely
to change very often), while giving almost all
essential information about dependencies for the project.

I wrote the next into the Makefile.am of the AVR part:

all: stamp.makefile

stamp.makefile: Makefile
        sed "s/ -MD / -MMD /" < Makefile > Makefile.tmp
        mv Makefile.tmp Makefile
        echo stamp > stamp.makefile

This run successfully, but I'm afraid such a description
of dependencies is not reliable.

Any suggestions? Perhaps, Automake has a general
built-in means to do the same?



      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at 
Yahoo! http://uk.docs.yahoo.com/ymail/new.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]