You were right... I was calling 'make -s' so emacs didnt have the current directory info.
Thanks a lot, Jan On December 29, 2009 11:27:53 Ralf Wildenhues wrote: > Hello Jan, > > * Jan Paral wrote on Mon, Dec 28, 2009 at 09:24:32PM CET: > > my library is split into several directories ... so I define _SOURCES > > variable as: > > libsatbase_a_SOURCES = cfgfile/grammar.c common/hash.cxx .... > > > > and I have several libraries in the project. The problem is when I > > compile the project by calling 'make' gcc report warnings/errors only as > > subdirectory/file_name. > > Why is that a problem? My editor is smart enough to recognize the > relative paths, and adjust the search paths based upon GNU make > `Entering directory...'/`Leaving directory...' messages. I'm pretty > sure that Emacs knows to do this as well. > > > Is there a way to force automake to pass into gcc the > > full source path? > > Absolute source paths are not such a good idea. They also happen to not > work well with the dependency tracking scheme employed by Automake. > > > Trying somethin like: > > $(abs_srcdir)/cfgfile/grammar.c > > > > This do the trick while compiling but then I get following error from > > 'make dist': > > > > cp: cannot stat `.//project/base/cfgfile/grammar.c': No such file or > > directory > > Hmm, that sounds like a bug. > > > The reason why I would like to include full source path is that emacs > > obviously can not find the file when compiling the library from > > different directory. > > See above; that would seem to be a problem specific to some other setup > of yours, as otherwise, you certainly wouldn't be the only person > complaining. > > Cheers, > Ralf >