public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc Configure System
@ 2008-01-17  1:00 Tom Browder
  2008-01-17  3:44 ` Tom Browder
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Browder @ 2008-01-17  1:00 UTC (permalink / raw)
  To: gcc-help

I'm trying to help with a new front end for gcc and have a question
about the configure system:

I notice that each Makefile generated by configure defines srcdir at
the top as the directory it is formed in (and then sometimes redefines
it later).

How, then, should one refer to the absolute root of the source tree
regardless of the depth of the Makefile?

Thanks.

-Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Gcc Configure System
  2008-01-17  1:00 Gcc Configure System Tom Browder
@ 2008-01-17  3:44 ` Tom Browder
  2008-01-17  4:23   ` Tim Prince
  2008-01-17 16:04   ` Ian Lance Taylor
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Browder @ 2008-01-17  3:44 UTC (permalink / raw)
  To: gcc-help

On 1/16/08, Tom Browder <tom.browder@gmail.com> wrote:
> I'm trying to help with a new front end for gcc and have a question
> about the configure system:
>
> I notice that each Makefile generated by configure defines srcdir at
> the top as the directory it is formed in (and then sometimes redefines
> it later).
>
> How, then, should one refer to the absolute root of the source tree
> regardless of the depth of the Makefile?

I should have been a little more specific:

The recommended way to build gcc is to use a clean directory outside
the source tree somthing like this:

  mkdir build_dir
  cd build_dir
/path/to/gcc_src/configure <options>

I want to know if there is a preferred or defined way to refer to
"/path/to/gcc_src" in build scripts or configure inputs since
"$(srcdir)" seems to be locally defined per Makefile.

Thanks.

-Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Gcc Configure System
  2008-01-17  3:44 ` Tom Browder
@ 2008-01-17  4:23   ` Tim Prince
  2008-01-17 16:04   ` Ian Lance Taylor
  1 sibling, 0 replies; 5+ messages in thread
From: Tim Prince @ 2008-01-17  4:23 UTC (permalink / raw)
  To: Tom Browder; +Cc: gcc-help

Tom Browder wrote:
> On 1/16/08, Tom Browder <tom.browder@gmail.com> wrote:
>> I'm trying to help with a new front end for gcc and have a question
>> about the configure system:
>>
>> I notice that each Makefile generated by configure defines srcdir at
>> the top as the directory it is formed in (and then sometimes redefines
>> it later).
>>
>> How, then, should one refer to the absolute root of the source tree
>> regardless of the depth of the Makefile?
> 
> I should have been a little more specific:
> 
> The recommended way to build gcc is to use a clean directory outside
> the source tree somthing like this:
> 
>   mkdir build_dir
>   cd build_dir
> /path/to/gcc_src/configure <options>
> 
> I want to know if there is a preferred or defined way to refer to
> "/path/to/gcc_src" in build scripts or configure inputs since
> "$(srcdir)" seems to be locally defined per Makefile.
> 

During bootstrap, by default, I observe that $HOME is included in a
search for your /path/to/gcc_src
When $HOME refers to a path which misleads the bootstrap machinery, it
is necessary to export HOME=
in order to make the bootstrap succeed.  Is there documentation on how
this is intended to work?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Gcc Configure System
  2008-01-17  3:44 ` Tom Browder
  2008-01-17  4:23   ` Tim Prince
@ 2008-01-17 16:04   ` Ian Lance Taylor
  2008-01-17 18:27     ` Tom Browder
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2008-01-17 16:04 UTC (permalink / raw)
  To: Tom Browder; +Cc: gcc-help

"Tom Browder" <tom.browder@gmail.com> writes:

> The recommended way to build gcc is to use a clean directory outside
> the source tree somthing like this:
> 
>   mkdir build_dir
>   cd build_dir
> /path/to/gcc_src/configure <options>
> 
> I want to know if there is a preferred or defined way to refer to
> "/path/to/gcc_src" in build scripts or configure inputs since
> "$(srcdir)" seems to be locally defined per Makefile.

Most Makefiles know where they are in the heirarchy, and thus do not
require any special handling--they use $(srcdir)/.. or whatever.

Where that is not the case, for libraries which are built using
multilib, we use the make variable top_srcdir.  E.g.,
libstdc++-v3/Makefile.am uses it.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Gcc Configure System
  2008-01-17 16:04   ` Ian Lance Taylor
@ 2008-01-17 18:27     ` Tom Browder
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Browder @ 2008-01-17 18:27 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

On 16 Jan 2008 16:55:05 -0800, Ian Lance Taylor <iant@google.com> wrote:
> "Tom Browder" <tom.browder@gmail.com> writes:
...
> > I want to know if there is a preferred or defined way to refer to
> > "/path/to/gcc_src" in build scripts or configure inputs since
> > "$(srcdir)" seems to be locally defined per Makefile.
>
> Most Makefiles know where they are in the heirarchy, and thus do not
> require any special handling--they use $(srcdir)/.. or whatever.
>
> Where that is not the case, for libraries which are built using
> multilib, we use the make variable top_srcdir.  E.g.,
> libstdc++-v3/Makefile.am uses it.

Thanks, Ian, I'll try that.

-Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-17  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17  1:00 Gcc Configure System Tom Browder
2008-01-17  3:44 ` Tom Browder
2008-01-17  4:23   ` Tim Prince
2008-01-17 16:04   ` Ian Lance Taylor
2008-01-17 18:27     ` Tom Browder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).