docs: fix up more brew --prefix usage.

The new form used to be slow but both are now fast.
This commit is contained in:
Mike McQuaid 2023-02-21 08:57:12 +00:00
parent 5b80085837
commit 11f94af0f2
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
2 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ which therefore dont need sudo.
_This is only recommended if you **don't** use rbenv or RVM._
Brewed Ruby installs executables to `$(brew --prefix)/opt/ruby/bin`
Brewed Ruby installs executables to `$(brew --prefix ruby)/bin`
without sudo. You should add this to your path. See the caveats in the
`ruby` formula for up-to-date information.
@ -91,7 +91,7 @@ Just install everything into the Homebrew prefix like this:
echo "export GEM_HOME=\"$(brew --prefix)\"" >> ~/.bashrc
```
### It doesnt work! I get some “permissions” error when I try to install stuff!
### It doesnt work! I get some “permissions” error when I try to install stuff
_Note that you may not want to do this, since Apple has decided it
is not a good default._

View File

@ -27,13 +27,13 @@ Useful, reliable alternatives exist should you wish to use keg-only tools outsid
You can set flags to give configure scripts or Makefiles a nudge in the right direction. An example of flag setting:
```sh
./configure --prefix=/Users/Dave/Downloads CFLAGS="-I$(brew --prefix)/opt/openssl/include" LDFLAGS="-L$(brew --prefix)/opt/openssl/lib"
./configure --prefix=/Users/Dave/Downloads CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib"
```
An example using `pip`:
```sh
CFLAGS="-I$(brew --prefix)/opt/icu4c/include" LDFLAGS="-L$(brew --prefix)/opt/icu4c/lib" pip install pyicu
CFLAGS="-I$(brew --prefix icu4c)/include" LDFLAGS="-L$(brew --prefix icu4c)/lib" pip install pyicu
```
### `PATH` modification
@ -41,7 +41,7 @@ CFLAGS="-I$(brew --prefix)/opt/icu4c/include" LDFLAGS="-L$(brew --prefix)/opt/ic
You can temporarily prepend your `PATH` with the tools `bin` directory, such as:
```sh
export PATH="$(brew --prefix)/opt/openssl/bin:${PATH}"
export PATH="$(brew --prefix openssl)/bin:${PATH}"
```
This will prepend the directory to your `PATH`, ensuring any build script that searches the `PATH` will find it first.
@ -55,7 +55,7 @@ If the tool you are attempting to build is [pkg-config](https://en.wikipedia.org
An example of this is:
```sh
export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl/lib/pkgconfig"
export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig"
```
If youre curious about the `PKG_CONFIG_PATH` variable, `man pkg-config` goes into more detail.