-I. in DEFAULT_INCLUDES
Hi there, I have a problem due to conflicts between local and system header filenames. This problem comes about because of the addition of -I. to the CXXFLAGS of any objects. I've traced this to a variable called DEFAULT_INCLUDES in every Makefile.in: DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir) Why does this -I. exist? How can I remove it? -- Bob Ham r...@bash.sh for (;;) { ++pancakes; } signature.asc Description: This is a digitally signed message part
Re: -I. in DEFAULT_INCLUDES
Hi Bob, On 7/6/2009 5:24 AM, Bob Ham wrote: Hi there, I have a problem due to conflicts between local and system header filenames. This problem comes about because of the addition of -I. to the CXXFLAGS of any objects. I've traced this to a variable called DEFAULT_INCLUDES in every Makefile.in: DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir) Why does this -I. exist? How can I remove it? DEFAULT_INCLUDES actually resolves to: DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) That is, the current directory, the source directory (if building outside the source tree), and the top build directory (in order to pick up config.h or other project-global headers. It is assumed that there would be no header files in the current or source directory that are not *more* important (and should thus be picked up first) than any other header files outside the project. Just curious - under what conditions do you have a header file in the local directory that you need to have overridden by a globally installed header file? Regards, John
Re: -I. in DEFAULT_INCLUDES
Bob Ham wrote: Hi there, I have a problem due to conflicts between local and system header filenames. This problem comes about because of the addition of -I. to the CXXFLAGS of any objects. I've traced this to a variable called DEFAULT_INCLUDES in every Makefile.in: DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir) put DEFAULT_INCLUDES = in your Makefile.am, automake will not change it, and the Makefile will then have this empty DEFAULT_INCLUDES. Peter -- Peter O'Gorman http://pogma.com
Re: -I. in DEFAULT_INCLUDES
Hello Bob, * Bob Ham wrote on Mon, Jul 06, 2009 at 01:24:06PM CEST: I have a problem due to conflicts between local and system header filenames. This problem comes about because of the addition of -I. to the CXXFLAGS of any objects. I've traced this to a variable called DEFAULT_INCLUDES in every Makefile.in: DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir) Why does this -I. exist? How can I remove it? See info Automake --index-search nostdinc for information about the Automake option nostdinc. Cheers, Ralf
Re: -I. in DEFAULT_INCLUDES
On Mon, 2009-07-06 at 09:34 -0600, John Calcote wrote: Just curious - under what conditions do you have a header file in the local directory that you need to have overridden by a globally installed header file? I have a file named string.h in a subdirectory. It's part of a library and ordinarily when the header is included, the name is qualified with the subdirectory. However, other files in the same subdirectory include headers from external libraries which in turn include `string.h'. When the subdirectory is compiled with `-I.', the local header is included instead of the system header. -- Bob Ham r...@bash.sh for (;;) { ++pancakes; } signature.asc Description: This is a digitally signed message part
Re: -I. in DEFAULT_INCLUDES
On Mon, 2009-07-06 at 19:46 +0200, Ralf Wildenhues wrote: * Bob Ham wrote on Mon, Jul 06, 2009 at 01:24:06PM CEST: DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir) Why does this -I. exist? How can I remove it? See info Automake --index-search nostdinc for information about the Automake option nostdinc. Yes, I found that after I sent the email, thanks. -- Bob Ham r...@bash.sh for (;;) { ++pancakes; } signature.asc Description: This is a digitally signed message part