While downloading and compiling the latest CVS sources I noticed that the command line for each (most?) source files reads like
gcc -c -I. -I. -I../../include -I../../include ............. or similar
This is not a serious problem but the duplication of the two include parameters strikes me as odd and definitely unnecessary, making the command line unnecessarily long.
Seems like something in the makefile generation is causing this.
Rolf Kalbermatter
Rolf Kalbermatter rolf.kalbermatter@citeng.com writes:
While downloading and compiling the latest CVS sources I noticed that the command line for each (most?) source files reads like
gcc -c -I. -I. -I../../include -I../../include ............. or similar
This is not a serious problem but the duplication of the two include parameters strikes me as odd and definitely unnecessary, making the command line unnecessarily long.
It's needed for out of tree builds, in that case the include paths are all different.
On 1 Apr 2003, Alexandre Julliard wrote:
It's needed for out of tree builds, in that case the include paths are all different.
True, but why do we need the -I.? Do we need to ever include anything from the current build dir?
"Dimitrie O. Paun" dimi@intelliware.ca writes:
True, but why do we need the -I.? Do we need to ever include anything from the current build dir?
Yes, some headers are generated, for instance the y.tab.h files.
On 1 Apr 2003, Alexandre Julliard wrote:
"Dimitrie O. Paun" dimi@intelliware.ca writes:
True, but why do we need the -I.? Do we need to ever include anything from the current build dir?
Yes, some headers are generated, for instance the y.tab.h files.
Shouldn't these be included with #include "y.tab.h"? In that case -I. should be unnecessary no?
Though it does not appear to be specified in the standard, all compilers I know of first look for y.tab.h in the current directory if included using quotes.
On April 1, 2003 09:24 pm, Francois Gouget wrote:
Though it does not appear to be specified in the standard, all compilers I know of first look for y.tab.h in the current directory if included using quotes.
I don't have a standard handy, but AFAIK K&R specifies this behaviour...
Francois Gouget fgouget@free.fr writes:
Though it does not appear to be specified in the standard, all compilers I know of first look for y.tab.h in the current directory if included using quotes.
At least gcc doesn't do that. It looks in the directory that the source file came from, which is *not* the current directory for out of tree builds. So the -I. is very much needed.
On April 2, 2003 12:15 am, Alexandre Julliard wrote:
At least gcc doesn't do that. It looks in the directory that the source file came from, which is *not* the current directory for out of tree builds. So the -I. is very much needed.
OK, but then we don't need to include the source dir <g>.
"Dimitrie O. Paun" dpaun@rogers.com writes:
On April 2, 2003 12:15 am, Alexandre Julliard wrote:
At least gcc doesn't do that. It looks in the directory that the source file came from, which is *not* the current directory for out of tree builds. So the -I. is very much needed.
OK, but then we don't need to include the source dir <g>.
Yes we do, not all files are in the main source dir. Believe it or not, all that stuff is here for a reason.