Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT 4.0: "Pre-Build Step" / Run `configure'
CDT 4.0: "Pre-Build Step" / Run `configure' [message #195166] Wed, 04 July 2007 14:07 Go to next message
Eclipse User
Originally posted by: eeide.cs.utah.edu

Hi! I'm trying CDT 4.0 after a long break from CDT, and I've managed to get
lost trying to use some of my GNU Autoconf-based sources with CDT. For those
who aren't familiar with Autoconf, a standard practice in Autoconf-based
projects is to have the actual project Makefile generated by a script called
`configure'.

While playing with CDT yesterday, I managed to navigate to a screen in which I
could specify a "pre-build step" for a configuration (?). I used this to run
my `configure' script, and that seemed to get things off the ground.

Today, however, for the life of me, I cannot find any dialog/screen/etc. that
allows me to specify this "pre-build" step. I've searched through the "C/C++
Build" property dialogs and the "Builders" and the "Manage Configurations"
dialogs for my projects, without success.

So, my questions:

+ Where is this widget that I found yesterday? I feel silly asking this
question, but here I am :-/.

+ Is the "pre-build" step the right hook for running things like a GNU-style
`configure' script? I obviously don't need this run on every build,
but it does need to be re-run from time to time (i.e., when the Makefile
needs to change).

Thanks for your patience with what I'm sure are some pretty novice CDT
questions!

Eric.

--
------------------------------------------------------------ -------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195198 is a reply to message #195166] Wed, 04 July 2007 14:37 Go to previous messageGo to next message
Eclipse User
Originally posted by: dschaefer.qnx.com

Eric Eide wrote:
> Hi! I'm trying CDT 4.0 after a long break from CDT, and I've managed to get
> lost trying to use some of my GNU Autoconf-based sources with CDT. For those
> who aren't familiar with Autoconf, a standard practice in Autoconf-based
> projects is to have the actual project Makefile generated by a script called
> `configure'.
>
> While playing with CDT yesterday, I managed to navigate to a screen in which I
> could specify a "pre-build step" for a configuration (?). I used this to run
> my `configure' script, and that seemed to get things off the ground.
>
> Today, however, for the life of me, I cannot find any dialog/screen/etc. that
> allows me to specify this "pre-build" step. I've searched through the "C/C++
> Build" property dialogs and the "Builders" and the "Manage Configurations"
> dialogs for my projects, without success.
>
> So, my questions:
>
> + Where is this widget that I found yesterday? I feel silly asking this
> question, but here I am :-/.
>
> + Is the "pre-build" step the right hook for running things like a GNU-style
> `configure' script? I obviously don't need this run on every build,
> but it does need to be re-run from time to time (i.e., when the Makefile
> needs to change).
>
> Thanks for your patience with what I'm sure are some pretty novice CDT
> questions!
>
> Eric.
>

For configure based projects, what I do is create an "External Tool",
which is up there beside the Debug and Run buttons in the toolbar. Then
I tell the external tool to run the shell with the configure script and
any of it's arguments as arguments to the tool. Once totally setup
properly, you can run the External Tool at any time.

The problem with the pre-build step is that it will run on every build
and that's definitely not something you want to do with configure.

Cheers,
Doug
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195206 is a reply to message #195198] Wed, 04 July 2007 15:39 Go to previous messageGo to next message
Eclipse User
Originally posted by: eeide.cs.utah.edu

"Doug" == Doug Schaefer <dschaefer@qnx.com> writes:

Doug> For configure based projects, what I do is create an "External
Doug> Tool", which is up there beside the Debug and Run buttons in the
Doug> toolbar. [...]

Thank you very much! I will give this a try.

But still I'm curious: where is the "pre-build command" gizmo in the UI, which
I found yesterday but I cannot find today? Presumably, until I can find this
again, I won't be able to turn my previous pre-build `configure' step off :-)!

Thanks again ---

Eric.

--
------------------------------------------------------------ -------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195257 is a reply to message #195198] Thu, 05 July 2007 04:10 Go to previous messageGo to next message
Jens Seidel is currently offline Jens Seidel
Messages: 88
Registered: July 2009
Member
Doug Schaefer wrote:

> Eric Eide wrote:
>> Hi! I'm trying CDT 4.0 after a long break from CDT, and I've managed to
>> get
>> lost trying to use some of my GNU Autoconf-based sources with CDT. For
>> those who aren't familiar with Autoconf, a standard practice in
>> Autoconf-based projects is to have the actual project Makefile generated
>> by a script called `configure'.
>>
>> + Is the "pre-build" step the right hook for running things like a
>> GNU-style
>> `configure' script? I obviously don't need this run on every build,
>> but it does need to be re-run from time to time (i.e., when the
>> Makefile needs to change).

There should be no need to call configure (or autoconf/automake/aclocal/...)
except for the first time. Everytime you change a Makefile.am or
configure.ac "make" should start it automatically. I'm not completely sure
but I think each manual invocation just indicates an error in the
autotools.

Or do you want to provide different arguments to configure, such as other
CXXFLAGS?

> For configure based projects, what I do is create an "External Tool",

I tried this too and noticed that before the tool is started, a build of the
project happens! This is not what I want!

> which is up there beside the Debug and Run buttons in the toolbar. Then

The first time I added it the menu was hard to find, since it was *not*
added to the Run menu item (but to the item in the toolbar, which opens if
I click a few seconds on it). After restarting Eclipse I found it. I added
another tool and it occurred without restart ...

Jens
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195262 is a reply to message #195257] Thu, 05 July 2007 04:27 Go to previous messageGo to next message
Eclipse User
Originally posted by: berndth.gmx.de

On Do, 05.07.2007 10:10, Jens Seidel wrote:

>There should be no need to call configure (or autoconf/automake/aclocal/...)
>except for the first time. Everytime you change a Makefile.am or
>configure.ac "make" should start it automatically.

As far as I know, this behavior is controlled by the
--enable-maintainer-mode to the configure script.

Holger
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195275 is a reply to message #195262] Thu, 05 July 2007 04:38 Go to previous messageGo to next message
Jens Seidel is currently offline Jens Seidel
Messages: 88
Registered: July 2009
Member
Holger Berndt wrote:

> On Do, 05.07.2007 10:10, Jens Seidel wrote:
>
>>There should be no need to call configure (or
>>autoconf/automake/aclocal/...) except for the first time. Everytime you
>>change a Makefile.am or configure.ac "make" should start it automatically.
>
> As far as I know, this behavior is controlled by the
> --enable-maintainer-mode to the configure script.

Ah, right! But this is just a very big mess! I strongly suggest to remove
the corresponding AM_MAINTAINER_MODE macro in autoconf.ac. Trust me it will
make you life easier.

This option is very controversial (see e.g.
http://sources.redhat.com/autobook/autobook/autobook_43.html for pros and
contras) and I would never use it but you're right, this could require such
manual calls.

Jens
Re: CDT 4.0: "Pre-Build Step" / Run `configure' [message #195305 is a reply to message #195257] Thu, 05 July 2007 10:17 Go to previous message
Eclipse User
Originally posted by: eeide.cs.utah.edu

"Jens" == Jens Seidel <jensseidel@users.sf.net> writes:

Jens> There should be no need to call configure (or
Jens> autoconf/automake/aclocal/...) except for the first time.
Jens> Everytime you change a Makefile.am or configure.ac "make" should
Jens> start it automatically. I'm not completely sure but I think each
Jens> manual invocation just indicates an error in the autotools.

Good point. The situation you describe is often true, especially for
Automake-based projects. But sometimes I just use "bare" Autoconf. I was an
Autoconf user long before I was an Automake user :-).

Jens> Or do you want to provide different arguments to configure, such
Jens> as other CXXFLAGS?

I do that, too! This seems like a fine mapping onto the "configurations" idea
that is built into CDT.

Jens> I tried this too and noticed that before the tool is started, a
Jens> build of the project happens! This is not what I want!

Me too, but this bogus build doesn't get very far without a Makefile :-).

Eric.

--
------------------------------------------------------------ -------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
Previous Topic:Postmortem debuugger error
Next Topic:CDT 4.0: Where is the build zip file?
Goto Forum:
  


Current Time: Wed Aug 20 06:45:08 EDT 2014

Powered by FUDForum. Page generated in 0.03707 seconds