Commit Graph
22 Commits
Author SHA1 Message Date
Adam Vandenberg 98c5b96454 --env: show HOMEBREW_CC in superenv
Closes #18247.
2013-05-02 11:36:30 -07:00
Jack Nagel 68a271c897 Exclude global pkgconfig dirs under superenv 2013-03-09 14:46:01 -06:00
Max Howell c30a7ff05c brew --env: Use fetch rather than []
Because we mess with the return value from [] in superenv due to many formula assuming CFLAGS etc. would not be nil.
2012-09-21 23:30:34 -04:00
Max Howell eab09fc267 Cram GL headers and includes into superenv
Fixes #14554.

We justify doing this because pre 10.8 X11 came with GL for all Homebrew-capable systems and as such is a default that we'd prefer not to have to address.
2012-08-31 14:12:28 -04:00
Max Howell c4d95a0934 brew --env puts HOMEBREW_SDKROOT 2012-08-31 10:22:10 -04:00
Max Howell 025e84d548 Always find git and svn without trying hard
Two wrapper scripts that find git and svn using the ENV variables we support and then searching through the PATH and looking inside Xcode.app if necessary.

Now just calling git or svn in Homebrew code will find and exec the right tool and we can stop fussing.

Apologies to @adamv who is probably unimpressed that the cmds directory has non-commands in it now. If it's consolation these are temporary pending some more work on superenv whereby some more directories are created under the superenv root.
2012-08-29 12:41:36 -04:00
Max Howell f4f5994dc4 Allow eg. brew --env libxml2
Example useful usage:

    eval $(brew --env gettext) && clang -Wl,-t -lssl 2>/dev/null
2012-08-29 12:41:35 -04:00
Max Howell 59736fb537 superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00
samueljohn 8f126192f5 brew --env: Added missing env vars
Closes #13431.

Signed-off-by: Max Howell <mxcl@me.com>
2012-08-06 18:22:45 -04:00
Jack Nagel 1bf2742b56 Dump Cmake environment variables in brew --env
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 13:51:23 -05:00
Max Howell 9d98450b90 Scupper sourceable output if brew install is piped
`brew install > file` should not give "export CC=/foo" output on Build Failures.

Also moved the "Using clang" output to brew when BuildError is thrown as that is where it is interesting, and not if you just do `brew --env`.
2012-03-02 00:59:39 +00:00
Max Howell 6bd2df763e Piped brew --env outputs in a sourceable format
So you can source `brew --env` to make it easier to build your own software, etc.
2012-03-01 14:07:40 +00:00
Max Howell 6b2340fd92 Don't hang if xcode-select -print-path is "/"
Introducing MacOS.xctools_fucked?.

Refs #10293.
2012-02-21 10:33:03 +00:00
Jack Nagel 18672b95bb brew --env: fix path to xcrun
Fixes #10327.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-19 20:32:06 -06:00
Max Howell 17af67977e Find xcrun if user doesn't ever install Xcode 4.3 helper tools 2012-02-17 13:34:06 +00:00
Max Howell ab0e0a3023 Use xcrun; Ensure clang is the default compiler with Xcode 4.3
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.

Also more thoroughly clear ENV.
2012-02-16 23:43:43 +00:00
Jack Nagel 684e3f8a15 brew --env: respect --universal
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-31 21:22:22 -06:00
Jack Nagel d2288949e4 --env: dump a few more environment variables
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 19:47:37 -06:00
Adam Vandenberg 9d07b5ac84 Inclue HOMEBREW_USE_CLANG in --env output 2011-06-16 20:58:06 -07:00
José Martínez 61cec92985 Add clang compiler option
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-16 20:45:52 -07:00
Stephen Allred c19b32dfc4 Added --use-gcc flag.
This allows you to use llvm as your default compiler and keep the cc symlink
pointed at llvm, while allowing you to build forumla that requires the gcc.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-12 11:55:06 -08:00
Max Howell 9afc85ad33 Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00