Home » Language IDEs » C / C++ IDE (CDT) » How to get /usr/include into autogen makefiles
How to get /usr/include into autogen makefiles [message #8616] |
Fri, 21 December 2001 06:31  |
Eclipse User |
|
|
|
OK, so I recreated all the stuff that I deleted yesterday, and now I am
trying to compile. I build all the autoconf/make files, and tried to
build the project. For some reason, although I have built things like
KDE on this box, this failed because it did not find the default libraries
in /usr/include. So I went in the project properties and added this
directory into the parse include, and it does find the files when I run
parse. But even though I have used all the menu items under autoconf
that are enabled from the Project, it still will not add a -I with the
right directory into the makefile. Am I supposed to add this manually
(and if so where and with what syntax) or have I missed a way to do it
automatically.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8628 is a reply to message #8616] |
Fri, 21 December 2001 07:27   |
Eclipse User |
|
|
|
David Goodenough wrote:
> OK, so I recreated all the stuff that I deleted yesterday, and now I am
> trying to compile. I build all the autoconf/make files, and tried to
> build the project. For some reason, although I have built things like
> KDE on this box, this failed because it did not find the default libraries
> in /usr/include. So I went in the project properties and added this
> directory into the parse include, and it does find the files when I run
> parse. But even though I have used all the menu items under autoconf
> that are enabled from the Project, it still will not add a -I with the
> right directory into the makefile. Am I supposed to add this manually
> (and if so where and with what syntax) or have I missed a way to do it
> automatically.
As a supplimentary along the same lines, if I have collections of include
files within the directory structure, how do I get these into the parse
include panel. I can see how to put absolutes like /usr/include into the
parse include list, but if I have a subdirectory within the project tree
which has a bunch of include files in it that I want to reference is there
a tag which says "relative to the project"? My structure (for historical
reasons) is:-
project
sub-project
component
sub-project-include
So from within directory component I want to have -I ../sub-project-include
on the gcc line. I obviously do not want to make the path absolute as
then when someone else checks it out of CVS the base of the project might
be different. The alternative would be to have:-
-I {$project}/sub-project/sub-project-include
and then have CDT substitute {$project} appropriately.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8680 is a reply to message #8616] |
Fri, 21 December 2001 13:44   |
Eclipse User |
|
|
|
David,
In an automake project, the build include path is specified by the
INCLUDES= lines in your Makefile.am templates, of which you have
one per directory. We haven't integrated automake documentation,
so you should find it on your system via "info automake".
Currently, you have to use a text editor to change these build parameters
from their default values. A better interface is in the works.
We also haven't coupled the build include setting to the parser include path,
so for now they are independent.
The particular error you are having is strange - gcc always searches
/usr/include. Is it actually subdirectories you need to have on the path?
If so, you
add them to INCLUDES=
rerun the "Generate configure" action on the project
rerun the "Run configure" action
and now your build should succeed.
Brian
David Goodenough wrote:
> OK, so I recreated all the stuff that I deleted yesterday, and now I am
> trying to compile. I build all the autoconf/make files, and tried to
> build the project. For some reason, although I have built things like
> KDE on this box, this failed because it did not find the default libraries
> in /usr/include. So I went in the project properties and added this
> directory into the parse include, and it does find the files when I run
> parse. But even though I have used all the menu items under autoconf
> that are enabled from the Project, it still will not add a -I with the
> right directory into the makefile. Am I supposed to add this manually
> (and if so where and with what syntax) or have I missed a way to do it
> automatically.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8692 is a reply to message #8680] |
Fri, 21 December 2001 14:46   |
Eclipse User |
|
|
|
Brian Thomson wrote:
> David,
>
> In an automake project, the build include path is specified by the
> INCLUDES= lines in your Makefile.am templates, of which you have
> one per directory. We haven't integrated automake documentation,
> so you should find it on your system via "info automake".
>
> Currently, you have to use a text editor to change these build parameters
> from their default values. A better interface is in the works.
>
> We also haven't coupled the build include setting to the parser include
> path, so for now they are independent.
>
> The particular error you are having is strange - gcc always searches
> /usr/include. Is it actually subdirectories you need to have on the
> path? If so, you
> add them to INCLUDES=
> rerun the "Generate configure" action on the project
> rerun the "Run configure" action
>
> and now your build should succeed.
>
> Brian
>
Well bits of it now work. There seems to be a problem if I go
through a file in the include structure which ends with a
non-standard extension (for historical reasons I had an include
file with a .h31 extension. That seems to stop it finding /usr/include
at all. BTW again for historical reasons my C++ files are called
..cxx, and those I have had to move manually in the .am SOURCE lists
as CDT had put them into the EXTRA_DIST value.
Now I have a problem locating a file below the /usr/include directory,
its one of Regina's files (rexxsaa.h) which lives in /usr/include/regina.
Surely there should be a portable way of finding this file rather than
just including it manually. It might be in /usr/include or it might
be in /usr/local/include or almost anywhere else.
>
>
> David Goodenough wrote:
>
>> OK, so I recreated all the stuff that I deleted yesterday, and now I am
>> trying to compile. I build all the autoconf/make files, and tried to
>> build the project. For some reason, although I have built things like
>> KDE on this box, this failed because it did not find the default
>> libraries
>> in /usr/include. So I went in the project properties and added this
>> directory into the parse include, and it does find the files when I run
>> parse. But even though I have used all the menu items under autoconf
>> that are enabled from the Project, it still will not add a -I with the
>> right directory into the makefile. Am I supposed to add this manually
>> (and if so where and with what syntax) or have I missed a way to do it
>> automatically.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8704 is a reply to message #8692] |
Fri, 21 December 2001 16:03   |
Eclipse User |
|
|
|
David,
As Brian mentioned, the integration between parse include path and the
include build path is not coupled - we are currently looking into it. Just
wanted to point out that not all of the generated Makefile.am's have the
INCLUDES line. You might want to add it - for example: INCLUDES =
$(myPath) and myPath is set to myPath="-I/mydir/mysubdir/.. -I/mydir/..
..." - manually whenever your build process can not find your files.
If you find that you need to add this line into many Makefile.am's then
what you could do is to change the template Makefile.am to include the
"INCLUDES=..." line with the parameters.
The template files are located under
../com.ibm.cpp.miners/autoconf_templates/.. Then the next time you execute
the "generate configure" action, The "INCLUDE=.." will exist in your
working Makefile.am
Also, I have added two comments below - hope this will help
Yasser
David Goodenough wrote:
> Brian Thomson wrote:
> > David,
> >
> > In an automake project, the build include path is specified by the
> > INCLUDES= lines in your Makefile.am templates, of which you have
> > one per directory. We haven't integrated automake documentation,
> > so you should find it on your system via "info automake".
> >
> > Currently, you have to use a text editor to change these build parameters
> > from their default values. A better interface is in the works.
> >
> > We also haven't coupled the build include setting to the parser include
> > path, so for now they are independent.
> >
> > The particular error you are having is strange - gcc always searches
> > /usr/include. Is it actually subdirectories you need to have on the
> > path? If so, you
> > add them to INCLUDES=
> > rerun the "Generate configure" action on the project
> > rerun the "Run configure" action
> >
> > and now your build should succeed.
> >
> > Brian
> >
> Well bits of it now work. There seems to be a problem if I go
> through a file in the include structure which ends with a
> non-standard extension (for historical reasons I had an include
> file with a .h31 extension. That seems to stop it finding /usr/include
> at all. BTW again for historical reasons my C++ files are called
> ..cxx, and those I have had to move manually in the .am SOURCE lists
> as CDT had put them into the EXTRA_DIST value.
SOURCES recognizes files with *.c, *.C, *.cpp but not with *.cxx
> Now I have a problem locating a file below the /usr/include directory,
> its one of Regina's files (rexxsaa.h) which lives in /usr/include/regina.
> Surely there should be a portable way of finding this file rather than
> just including it manually. It might be in /usr/include or it might
> be in /usr/local/include or almost anywhere else.
We will be looking into this , but for now you can manually define the
path in the INCLUDES line as mentioned above
> > David Goodenough wrote:
> >
> >> OK, so I recreated all the stuff that I deleted yesterday, and now I am
> >> trying to compile. I build all the autoconf/make files, and tried to
> >> build the project. For some reason, although I have built things like
> >> KDE on this box, this failed because it did not find the default
> >> libraries
> >> in /usr/include. So I went in the project properties and added this
> >> directory into the parse include, and it does find the files when I run
> >> parse. But even though I have used all the menu items under autoconf
> >> that are enabled from the Project, it still will not add a -I with the
> >> right directory into the makefile. Am I supposed to add this manually
> >> (and if so where and with what syntax) or have I missed a way to do it
> >> automatically.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8714 is a reply to message #8704] |
Fri, 21 December 2001 16:32   |
Eclipse User |
|
|
|
Thank you for all the comments. I know that CDT is a work in progress and
a very good one, hopefully some of my input might help to make it even
better.
Yasser wrote:
> David,
>
> As Brian mentioned, the integration between parse include path and the
> include build path is not coupled - we are currently looking into it. Just
> wanted to point out that not all of the generated Makefile.am's have the
> INCLUDES line. You might want to add it - for example: INCLUDES =
> $(myPath) and myPath is set to myPath="-I/mydir/mysubdir/.. -I/mydir/..
> .." - manually whenever your build process can not find your files.
> If you find that you need to add this line into many Makefile.am's then
> what you could do is to change the template Makefile.am to include the
> "INCLUDES=..." line with the parameters.
> The template files are located under
> ./com.ibm.cpp.miners/autoconf_templates/.. Then the next time you execute
> the "generate configure" action, The "INCLUDE=.." will exist in your
> working Makefile.am
>
> Also, I have added two comments below - hope this will help
>
> Yasser
>
> David Goodenough wrote:
>
>> Brian Thomson wrote:
>
>> > David,
>> >
>> > In an automake project, the build include path is specified by the
>> > INCLUDES= lines in your Makefile.am templates, of which you have
>> > one per directory. We haven't integrated automake documentation,
>> > so you should find it on your system via "info automake".
>> >
>> > Currently, you have to use a text editor to change these build
>> > parameters
>> > from their default values. A better interface is in the works.
>> >
>> > We also haven't coupled the build include setting to the parser include
>> > path, so for now they are independent.
>> >
>> > The particular error you are having is strange - gcc always searches
>> > /usr/include. Is it actually subdirectories you need to have on the
>> > path? If so, you
>> > add them to INCLUDES=
>> > rerun the "Generate configure" action on the project
>> > rerun the "Run configure" action
>> >
>> > and now your build should succeed.
>> >
>> > Brian
>> >
>> Well bits of it now work. There seems to be a problem if I go
>> through a file in the include structure which ends with a
>> non-standard extension (for historical reasons I had an include
>> file with a .h31 extension. That seems to stop it finding /usr/include
>> at all. BTW again for historical reasons my C++ files are called
>> ..cxx, and those I have had to move manually in the .am SOURCE lists
>> as CDT had put them into the EXTRA_DIST value.
> SOURCES recognizes files with *.c, *.C, *.cpp but not with *.cxx
Is there any way I can change this. Generally Eclipse is so sonfigurable
that is seems odd that I can not (I could always change the code I suppose).
>
>> Now I have a problem locating a file below the /usr/include directory,
>> its one of Regina's files (rexxsaa.h) which lives in /usr/include/regina.
>> Surely there should be a portable way of finding this file rather than
>> just including it manually. It might be in /usr/include or it might
>> be in /usr/local/include or almost anywhere else.
>
> We will be looking into this , but for now you can manually define the
> path in the INCLUDES line as mentioned above
>
>
>> > David Goodenough wrote:
>> >
>> >> OK, so I recreated all the stuff that I deleted yesterday, and now I
>> >> am
>> >> trying to compile. I build all the autoconf/make files, and tried to
>> >> build the project. For some reason, although I have built things like
>> >> KDE on this box, this failed because it did not find the default
>> >> libraries
>> >> in /usr/include. So I went in the project properties and added this
>> >> directory into the parse include, and it does find the files when I
>> >> run
>> >> parse. But even though I have used all the menu items under autoconf
>> >> that are enabled from the Project, it still will not add a -I with the
>> >> right directory into the makefile. Am I supposed to add this manually
>> >> (and if so where and with what syntax) or have I missed a way to do it
>> >> automatically.
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8726 is a reply to message #8704] |
Fri, 21 December 2001 16:52   |
Eclipse User |
|
|
|
It is true that our .am generator doesn't recognize .cxx , but David has a valid
complaint. .cxx is a standard suffix, and automake by default recognizes all of
..cc, .c++, .cpp, .C, and .cxx as C++ source files, so I think we should too.
Yasser wrote:
> > BTW again for historical reasons my C++ files are called
> > ..cxx, and those I have had to move manually in the .am SOURCE lists
> > as CDT had put them into the EXTRA_DIST value.
> SOURCES recognizes files with *.c, *.C, *.cpp but not with *.cxx
|
|
|
Re: How to get /usr/include into autogen makefiles [message #8739 is a reply to message #8714] |
Sat, 22 December 2001 00:00  |
Eclipse User |
|
|
|
David Goodenough wrote:
> > SOURCES recognizes files with *.c, *.C, *.cpp but not with *.cxx
> Is there any way I can change this. Generally Eclipse is so sonfigurable
> that is seems odd that I can not (I could always change the code I suppose).
Currently, there is no way to select the file extensions that SOURCES
accept, and of course you can change the code. It might be a good idea to
give the user the capability to configure those extentions, we will
investigate that. Finally, in the coming drop, SOURCES will recognize the
following
extensions: *.c, *.cc, *.cpp, *.cxx, *.c++, *.C
Yasser
|
|
|
Goto Forum:
Current Time: Tue Apr 29 02:36:39 EDT 2025
Powered by FUDForum. Page generated in 0.09962 seconds
|