public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
@ 1999-05-18  9:43 ` CaT
  1999-05-18 10:20 ` David L. Nicol
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: CaT @ 1999-05-18  9:43 UTC (permalink / raw)
  To: egcs

Hi,

ATM I'm trying to build a linux system from scratch. One of my aims in
doing so is to learn more about how a linux system is put together. Another
is to have everything compile from source.

I'm at the beginning of this and face a small problem in that I need to
install into one dir tree but have the s/w I install run in another.

Basically I install in say:

/new/usr

but when I boot into it (eventually)

I want the s/w to run in

/usr

To do this I need to define what the root of the filesystem is so that
the s/w gets installed in one set of dirs but all the config files and
and paths hardcoded into the s/w are for another tree.

I can do this with glibc, ncurses, and a fair few other utilities. While
not documented they do have mechanisms for doing this. Egcs does not so
I was wondering if it would be possible to put in a mechanism that allows
me to have an install dir that is wholly different from the runtime dir.
This is more extensive then the difference between prefix and exec_prefix.

This would help me with the problem I face in trying to build my system
as well as let people first install into a seperate directory to see (for
example) what gets installed where and then simply copy the files across.

-- 
CaT (cat@zip.net.au)                       URL: http://www.zip.com.au/dev/null

Hercules: Wherever there was evil. Wherever an innocent would suffer, THERE
	  was Hercules!

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

* Re: faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
  1999-05-18  9:43 ` CaT
@ 1999-05-18 10:20 ` David L. Nicol
  1999-05-31 21:36   ` David L. Nicol
  1999-05-18 10:31 ` Arvind Sankar
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: David L. Nicol @ 1999-05-18 10:20 UTC (permalink / raw)
  To: CaT; +Cc: egcs

CaT wrote:


> To do this I need to define what the root of the filesystem is


info chroot

chroot --help

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

* Re: faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
  1999-05-18  9:43 ` CaT
  1999-05-18 10:20 ` David L. Nicol
@ 1999-05-18 10:31 ` Arvind Sankar
  1999-05-31 21:36   ` Arvind Sankar
  1999-05-18 11:36 ` Philipp Thomas
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Arvind Sankar @ 1999-05-18 10:31 UTC (permalink / raw)
  To: CaT; +Cc: egcs

On Wed, May 19, 1999 at 02:43:55AM +1000, CaT wrote:
> 
> Hi,
> 
> ATM I'm trying to build a linux system from scratch. One of my aims in
> doing so is to learn more about how a linux system is put together. Another
> is to have everything compile from source.
> 
> I'm at the beginning of this and face a small problem in that I need to
> install into one dir tree but have the s/w I install run in another.
> 
> Basically I install in say:
> 
> /new/usr
> 
> but when I boot into it (eventually)
> 
> I want the s/w to run in
> 
> /usr
> 
> To do this I need to define what the root of the filesystem is so that
> the s/w gets installed in one set of dirs but all the config files and
> and paths hardcoded into the s/w are for another tree.
> 
> I can do this with glibc, ncurses, and a fair few other utilities. While
> not documented they do have mechanisms for doing this. Egcs does not so
> I was wondering if it would be possible to put in a mechanism that allows
> me to have an install dir that is wholly different from the runtime dir.
> This is more extensive then the difference between prefix and exec_prefix.

$srcdir/configure --prefix=/usr
make
make install prefix=/new/usr

should work with any package which uses GNUish configure and Makefile. It
definitely works with egcs. I do it daily.

-- arvind

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

* Re: faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
                   ` (2 preceding siblings ...)
  1999-05-18 10:31 ` Arvind Sankar
@ 1999-05-18 11:36 ` Philipp Thomas
  1999-05-31 21:36   ` Philipp Thomas
  1999-05-18 20:22 ` CaT
  1999-05-31 21:36 ` CaT
  5 siblings, 1 reply; 10+ messages in thread
From: Philipp Thomas @ 1999-05-18 11:36 UTC (permalink / raw)
  To: CaT; +Cc: egcs

On Wed, 19 May 1999 02:43:55 +1000 (EST), you wrote:

>I was wondering if it would be possible to put in a mechanism that allows
>me to have an install dir that is wholly different from the runtime dir.
>This is more extensive then the difference between prefix and exec_prefix.

Excuse me if I misunderstood you, but what about
 
  ./configure --prefix=/usr

and then later

  make prefix=/new/user install



Philipp

-- 
You have moved your mouse. Windows must be rebooted for the
changes to take effect.

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

* Re: faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
                   ` (3 preceding siblings ...)
  1999-05-18 11:36 ` Philipp Thomas
@ 1999-05-18 20:22 ` CaT
  1999-05-31 21:36 ` CaT
  5 siblings, 0 replies; 10+ messages in thread
From: CaT @ 1999-05-18 20:22 UTC (permalink / raw)
  To: Philipp Thomas; +Cc: cat, egcs

Philipp Thomas wrote the following:
> 
> On Wed, 19 May 1999 02:43:55 +1000 (EST), you wrote:
> 
> >I was wondering if it would be possible to put in a mechanism that allows
> >me to have an install dir that is wholly different from the runtime dir.
> >This is more extensive then the difference between prefix and exec_prefix.
> 
> Excuse me if I misunderstood you, but what about
>  
>   ./configure --prefix=/usr
> 
> and then later
> 
>   make prefix=/new/user install

I do believe a clue has dawned. :) I wonder what else that'll work for. Many
thanks for your help.

-- 
CaT (cat@zip.net.au)                       URL: http://www.zip.com.au/dev/null

For a bad joke read:

        http://www2.hunterlink.net.au/~ddhrg/censorship_legislation.html

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

* Re: faking root (/) in makefile
  1999-05-18 11:36 ` Philipp Thomas
@ 1999-05-31 21:36   ` Philipp Thomas
  0 siblings, 0 replies; 10+ messages in thread
From: Philipp Thomas @ 1999-05-31 21:36 UTC (permalink / raw)
  To: CaT; +Cc: egcs

On Wed, 19 May 1999 02:43:55 +1000 (EST), you wrote:

>I was wondering if it would be possible to put in a mechanism that allows
>me to have an install dir that is wholly different from the runtime dir.
>This is more extensive then the difference between prefix and exec_prefix.

Excuse me if I misunderstood you, but what about
 
  ./configure --prefix=/usr

and then later

  make prefix=/new/user install



Philipp

-- 
You have moved your mouse. Windows must be rebooted for the
changes to take effect.

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

* faking root (/) in makefile
  1999-05-18  9:43 ` CaT
@ 1999-05-31 21:36 CaT
  1999-05-18  9:43 ` CaT
                   ` (5 more replies)
  -1 siblings, 6 replies; 10+ messages in thread
From: CaT @ 1999-05-31 21:36 UTC (permalink / raw)
  To: egcs

Hi,

ATM I'm trying to build a linux system from scratch. One of my aims in
doing so is to learn more about how a linux system is put together. Another
is to have everything compile from source.

I'm at the beginning of this and face a small problem in that I need to
install into one dir tree but have the s/w I install run in another.

Basically I install in say:

/new/usr

but when I boot into it (eventually)

I want the s/w to run in

/usr

To do this I need to define what the root of the filesystem is so that
the s/w gets installed in one set of dirs but all the config files and
and paths hardcoded into the s/w are for another tree.

I can do this with glibc, ncurses, and a fair few other utilities. While
not documented they do have mechanisms for doing this. Egcs does not so
I was wondering if it would be possible to put in a mechanism that allows
me to have an install dir that is wholly different from the runtime dir.
This is more extensive then the difference between prefix and exec_prefix.

This would help me with the problem I face in trying to build my system
as well as let people first install into a seperate directory to see (for
example) what gets installed where and then simply copy the files across.

-- 
CaT (cat@zip.net.au)                       URL: http://www.zip.com.au/dev/null

Hercules: Wherever there was evil. Wherever an innocent would suffer, THERE
	  was Hercules!

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

* Re: faking root (/) in makefile
  1999-05-18 10:20 ` David L. Nicol
@ 1999-05-31 21:36   ` David L. Nicol
  0 siblings, 0 replies; 10+ messages in thread
From: David L. Nicol @ 1999-05-31 21:36 UTC (permalink / raw)
  To: CaT; +Cc: egcs

CaT wrote:


> To do this I need to define what the root of the filesystem is


info chroot

chroot --help

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

* Re: faking root (/) in makefile
  1999-05-31 21:36 faking root (/) in makefile CaT
                   ` (4 preceding siblings ...)
  1999-05-18 20:22 ` CaT
@ 1999-05-31 21:36 ` CaT
  5 siblings, 0 replies; 10+ messages in thread
From: CaT @ 1999-05-31 21:36 UTC (permalink / raw)
  To: Philipp Thomas; +Cc: cat, egcs

Philipp Thomas wrote the following:
> 
> On Wed, 19 May 1999 02:43:55 +1000 (EST), you wrote:
> 
> >I was wondering if it would be possible to put in a mechanism that allows
> >me to have an install dir that is wholly different from the runtime dir.
> >This is more extensive then the difference between prefix and exec_prefix.
> 
> Excuse me if I misunderstood you, but what about
>  
>   ./configure --prefix=/usr
> 
> and then later
> 
>   make prefix=/new/user install

I do believe a clue has dawned. :) I wonder what else that'll work for. Many
thanks for your help.

-- 
CaT (cat@zip.net.au)                       URL: http://www.zip.com.au/dev/null

For a bad joke read:

        http://www2.hunterlink.net.au/~ddhrg/censorship_legislation.html

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

* Re: faking root (/) in makefile
  1999-05-18 10:31 ` Arvind Sankar
@ 1999-05-31 21:36   ` Arvind Sankar
  0 siblings, 0 replies; 10+ messages in thread
From: Arvind Sankar @ 1999-05-31 21:36 UTC (permalink / raw)
  To: CaT; +Cc: egcs

On Wed, May 19, 1999 at 02:43:55AM +1000, CaT wrote:
> 
> Hi,
> 
> ATM I'm trying to build a linux system from scratch. One of my aims in
> doing so is to learn more about how a linux system is put together. Another
> is to have everything compile from source.
> 
> I'm at the beginning of this and face a small problem in that I need to
> install into one dir tree but have the s/w I install run in another.
> 
> Basically I install in say:
> 
> /new/usr
> 
> but when I boot into it (eventually)
> 
> I want the s/w to run in
> 
> /usr
> 
> To do this I need to define what the root of the filesystem is so that
> the s/w gets installed in one set of dirs but all the config files and
> and paths hardcoded into the s/w are for another tree.
> 
> I can do this with glibc, ncurses, and a fair few other utilities. While
> not documented they do have mechanisms for doing this. Egcs does not so
> I was wondering if it would be possible to put in a mechanism that allows
> me to have an install dir that is wholly different from the runtime dir.
> This is more extensive then the difference between prefix and exec_prefix.

$srcdir/configure --prefix=/usr
make
make install prefix=/new/usr

should work with any package which uses GNUish configure and Makefile. It
definitely works with egcs. I do it daily.

-- arvind

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

end of thread, other threads:[~1999-05-31 21:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-31 21:36 faking root (/) in makefile CaT
1999-05-18  9:43 ` CaT
1999-05-18 10:20 ` David L. Nicol
1999-05-31 21:36   ` David L. Nicol
1999-05-18 10:31 ` Arvind Sankar
1999-05-31 21:36   ` Arvind Sankar
1999-05-18 11:36 ` Philipp Thomas
1999-05-31 21:36   ` Philipp Thomas
1999-05-18 20:22 ` CaT
1999-05-31 21:36 ` CaT

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).