* Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob
@ 2017-09-11 23:17 Mace Ayres
2017-09-12 0:23 ` Dennis Lee Bieber
2017-09-12 7:33 ` Simon Wright
0 siblings, 2 replies; 4+ messages in thread
From: Mace Ayres @ 2017-09-11 23:17 UTC (permalink / raw)
Sorry for some beginner's questions, but.
New to Mac OSX. Various software instructions may say home directory; is that OS X ./USERS/Me
or Unix's /usr/me:
Sometime they refer to the bin directory. Which bin?
Some instructions say $prefix .. what prefix is that?
Is this even an understandable question?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob
2017-09-11 23:17 Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob Mace Ayres
@ 2017-09-12 0:23 ` Dennis Lee Bieber
2017-09-12 7:02 ` Georg Bauhaus
2017-09-12 7:33 ` Simon Wright
1 sibling, 1 reply; 4+ messages in thread
From: Dennis Lee Bieber @ 2017-09-12 0:23 UTC (permalink / raw)
On Mon, 11 Sep 2017 16:17:51 -0700 (PDT), Mace Ayres <mace.ayres@gmail.com>
declaimed the following:
>Sorry for some beginner's questions, but.
>
>New to Mac OSX. Various software instructions may say home directory; is that OS X ./USERS/Me
>or Unix's /usr/me:
>
>Sometime they refer to the bin directory. Which bin?
>
>Some instructions say $prefix .. what prefix is that?
>
>Is this even an understandable question?
None of these questions are applicable to Ada itself -- they are all
dependent upon the operating system in use, so the answer is really in the
OS documentation or guide books.
However...
Linux (UNIX) home directory is normally
/home/{username}
and often accessible using ~
wulfraed@stretch:~$ cd ~
wulfraed@stretch:~$ pwd
/home/wulfraed
wulfraed@stretch:~$
I do not know how Mac handles paths. In Linux, a leading "./" indicates
current directory (and is often used when one is trying to run a local
executable that is NOT in the search path: ./program or ./scriptfile -- for
safety, Linux will not run programs in the current directory by name only,
to avoid trojans; if someone had stuffed a virus program called, say, gcc
in your home directory, and you try to compile something by typing "gcc -o
myprog myprog.c" it will ignore the virus file and use the system gcc --
but "./gcc -o myprog myprog.c" would run the virus file )
/usr is NOT a home directory! It is a location where non-OS applications
tend to be installed...
Normally, "bin" is likely the one at the root level of the file system
(root is a simple /):
wulfraed@stretch:~$ ls /
bin home lib32 media root sys vmlinuz
boot initrd.img lib64 mnt run tmp vmlinuz.old
dev initrd.img.old libx32 opt sbin usr
etc lib lost+found proc srv var
wulfraed@stretch:~$
... however, you will also find a bin under /usr
wulfraed@stretch:~$ ls /usr
bin games include lib lib32 libx32 local sbin share src
wulfraed@stretch:~$
(sbin tends to be for privileged applications -- stuff that affects how the
system itself operates and may need root privileges to execute)
"$prefix" means the value of the environment variable "prefix"
wulfraed@stretch:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
wulfraed@stretch:~$
(I don't have a "prefix" variable defined, so I used the command search
path)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob
2017-09-12 0:23 ` Dennis Lee Bieber
@ 2017-09-12 7:02 ` Georg Bauhaus
0 siblings, 0 replies; 4+ messages in thread
From: Georg Bauhaus @ 2017-09-12 7:02 UTC (permalink / raw)
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
> On Mon, 11 Sep 2017 16:17:51 -0700 (PDT), Mace Ayres <mace.ayres@gmail.com>
> declaimed the following:
>
>> Sorry for some beginner's questions, but.
>>
>> New to Mac OSX. Various software instructions may say home directory; is
>> that OS X ./USERS/Me
>> or Unix's /usr/me:
>>
>> Sometime they refer to the bin directory. Which bin?
>>
>> Some instructions say $prefix .. what prefix is that?
>>
>> Is this even an understandable question?
>
> None of these questions are applicable to Ada itself -- they are all
> dependent upon the operating system in use, so the answer is really in the
> OS documentation or guide books.
>
> However...
>
> Linux (UNIX) home directory is normally
> /home/{username}
> and often accessible using ~
>
> wulfraed@stretch:~$ cd ~
> wulfraed@stretch:~$ pwd
> /home/wulfraed
> wulfraed@stretch:~$
>
> I do not know how Mac handles paths.
MacOS is mostly a BSD Unix with a different kernel,
a different graphics system and some frameworks added
to support these.
$ echo $HOME
in a terminal window will show where the home
directory is.
> /usr is NOT a home directory! It is a location where non-OS applications
> tend to be installed...
>
Unix System Resources is abbreviated to become
"usr".
The directory has programs that are
(a) installed with Unix itself, typically command line
utilities
(b) could be shared by several local machines in a
traditional Unix network installation
$ man hier
in a terminal window should explain the file system
hierarchy.
>
> "$prefix" means the value of the environment variable "prefix"
It usually refers to a path setting in a configuration
file used in compiling a larger program.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob
2017-09-11 23:17 Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob Mace Ayres
2017-09-12 0:23 ` Dennis Lee Bieber
@ 2017-09-12 7:33 ` Simon Wright
1 sibling, 0 replies; 4+ messages in thread
From: Simon Wright @ 2017-09-12 7:33 UTC (permalink / raw)
Mace Ayres <mace.ayres@gmail.com> writes:
> New to Mac OSX. Various software instructions may say home directory;
> is that OS X ./USERS/Me
> or Unix's /usr/me:
It's wherever you get to when you log in! (also, the value of the HOME
environment variable). Mine, on macOS, is /Users/simon
> Sometime they refer to the bin directory. Which bin?
>
> Some instructions say $prefix .. what prefix is that?
When a Unix-style application is installed, all its components will be
under some directory.
System utilities will be under /usr normally, and the layout is fairly
standard: /usr/bin, /usr/include, /usr/lib etc.
Non-system utilities should be somewhere else, not least so that the
base system is still usable and can still be upgraded.
A typical place would be under /usr/local. But if you use just this, you
can end up with different utilities clashing; and you can't easily
remove a utility that you no longer need (I realise that package
managers such as RPM, aptitude, macports & homebrew achieve this too).
As far as I can remember, GNAT GPL wants to install under
/usr/local/gnat; I don't like this, because I want to keep different
versions on my machine. On Windows, GNAT caters to this by installing
under C:\GNAT\2017 for example.
So, I install GNAT GPL under /opt/gnat-gpl-2017 etc and FSF GCC under
/opt/gcc-7.1.0 etc. (the /opt comes from, I think, Solaris).
The layout of the compiler under that directory is the same, so it's
handy to have a way of referring to that directory. $prefix is that way!
That name is used because most Unix build tools (I mean, the tools for
building the application) use an environment variable $prefix for this
purpose.
But, it's only a handy name for "wherever you installed the application"
- there's no actual variable involved.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-12 7:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 23:17 Beginner in Mac OS X, and ADA and gtkAda: $prefix, and what bin, and home is usr/bob or OSX Users/bob Mace Ayres
2017-09-12 0:23 ` Dennis Lee Bieber
2017-09-12 7:02 ` Georg Bauhaus
2017-09-12 7:33 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox