summaryrefslogtreecommitdiff
path: root/src/rebar_port_compiler.erl
Commit message (Collapse)AuthorAgeFilesLines
* Add support for first_files to port compilerTim Watson2011-11-301-3/+22
| | | | | This patch adds support for first_files to the port_compiler, via the new `port_first_files` rebar config element.
* Remove obsolete comments (thanks Tim Watson)Tuncer Ayaz2011-11-041-8/+0
|
* Fix comments and formattingTuncer Ayaz2011-10-261-7/+11
|
* Overhaul environment expansion for better performanceDave Smith2011-10-261-28/+41
| | | | | | | | | | The introduction of setup_env as a global concept caused the rebar_port_compiler implementation to start getting called a LOT. The expansion of environment variables that happens in the port compiler was O(n^n), which means you could see upwards of 80k invocations of lists:foldl on a single app "./rebar clean". This commit reworks the expansion to be O(n^2), and reduces the running time for the same operation by 60%+. On a large project like Riak, the end result is that a build went from 200 seconds to 73.
* Add -D support to rebar_port_compilerTuncer Ayaz2011-10-231-1/+11
|
* Limit line lengthTuncer Ayaz2011-08-201-2/+4
|
* Support command invocation on Windows without MSYSJan Klötzke2011-08-201-19/+7
| | | | | | If MSYS (with bash) is not installed on Windows then do the shell variable substitution by ourselves. Otherwise just call bash to do the job.
* Extend port compiler default env for Darwin 11 32-bitTuncer Ayaz2011-08-011-1/+6
|
* Apply Tidier suggestionsTuncer Ayaz2011-06-021-1/+1
|
* Make port compilation template configurableJuhani Rankimies2011-06-021-15/+40
| | | | | | - Port compiler no longer requires bash on windows. - It's possible to use compilers whose command lines don't fit into the default template
* Cleanup deprecations now that R14B03 is releasedTuncer Ayaz2011-05-311-41/+1
|
* Extract code to get wordsize into helper functionTuncer Ayaz2011-05-311-8/+1
|
* Use external wordsize to get emulator build archSteve Vinoski2011-05-311-1/+8
| | | | | | | | | | | | | | | Calling erlang:system_info(wordsize) yields the internal word size of the Erlang emulator. But due to the halfword emulator, need to pass {wordsize, external} instead to get the word size, or pointer size, as seen by external code such as NIFs. The halfword emulator has 4 byte internal words but 8 byte external words due to 64-bit compilation, which means NIFs for the halfword emulator also have to be compiled 64-bit. But just passing wordsize is equivalent to passing {wordsize, internal}, which does not indicate the pointer size for the halfword emulator. Older versions of Erlang do not support {wordsize, external}, though, so continue to pass just wordsize for those versions.
* Change arch-specific port_sources to take a listAndrew Tunnell-Jones2011-05-281-6/+6
| | | | | | | | | | Change the second parameter of a regex tagged port_source from being a filename or wildcard to being a list of filenames or wildcards. Previously: {"R14", "c_src/*.c"} Now: {"R14", ["c_src/*.c"]} Motivation for change is to avoid repeating regexes.
* Fix leftover whitespace errorsTuncer Ayaz2011-05-231-9/+9
|
* Fix indentation errorsTuncer Ayaz2011-05-231-37/+36
|
* Fix indentation errorsTuncer Ayaz2011-05-211-36/+37
|
* Change logic to support more port env use casesAnthony Molinaro2011-05-131-11/+41
| | | | | | | | | | | | | | | | | | The logic changes from strict overrides to a hybrid for merging os_env and defaults, whereby defaults are chosen if they are not set in the os_env or if the defaults contains substitutions (at which point os environment is substituted). This still means that rebar.config works as it did before, where it overrides or substitutes based on the use of $VAR, but that default and os environment merging works such that the common cases of providing CC or LDFLAGS in the users environment or command line work as you might expect. In that CC is overriden by the os environment unless rebar.config overrides it, and LDFLAGS from the user environment is appended or prepended based on defaults and rebar.config. Addresses problems with https://github.com/basho/rebar/pull/71 Also keeps the fix for bug 255.
* Fix code readability in port_compilerTuncer Ayaz2011-05-121-15/+15
|
* Add missing newline in port_compiler debug msgTuncer Ayaz2011-04-281-1/+1
|
* Add support for command-specific env for hooksTuncer Ayaz2011-04-211-11/+12
|
* Deprecate fail_on_warning and refactor codeTuncer Ayaz2011-04-071-17/+6
|
* Deprecate old hooksTuncer Ayaz2011-03-121-0/+17
|
* Clean up codeTuncer Ayaz2011-02-061-60/+84
|
* Clean up emacs file local variablesTuncer Ayaz2011-01-311-1/+1
|
* Use filename:join instead of ?FMTTuncer Ayaz2011-01-281-2/+4
|
* Add support for arch specific port_sourcesAndrew Tunnell-Jones2011-01-171-1/+13
| | | | | | | | | On one project I have a need to specify port_sources on R14 only and on another different project port_sources for Darwin and Linux. To this end add support to handle tuples of the form {ArchRegex, PortSource} in the port_sources list, eg: {port_sources, [{"R14", ["c_src/*.c"]}]}.
* Apply Tidier suggestionsTuncer Ayaz2011-01-131-1/+4
|
* Unify executable invocationJuhani Rankimies2011-01-061-9/+13
| | | | | Add flags to rebar_utils:sh to control output and error handling. Replace calls to os:cmd with calls to rebar_utils:sh.
* Tidier improvementsKostis Sagonas2010-10-261-3/+2
|
* Fix dialyzer warning for filename:join/2 callsTuncer Ayaz2010-09-291-1/+1
|
* Basic tweaks for compiling ports/nifs on mingwDan Gudmundsson2010-09-181-1/+20
|
* Defaulting CC->cc and CXX->c++ for better cross platform supportDave Smith2010-07-121-2/+2
|
* Fix bug 255; O/S environment vars should be processed last, not firstDave Smith2010-06-221-1/+1
|
* Complete implementation for simplistic .app.src processing.Dave Smith2010-05-071-6/+2
|
* Make sure that the so_specs stuff is properly backwards compatibleDave Smith2010-05-031-14/+23
|
* Add missing CXXFLAGS equivalents of CFLAGSTuncer Ayaz2010-04-291-0/+3
|
* merged from bashoCliff Moon2010-04-281-2/+13
|\
| * Add default CFLAGS for platforms where there can be variation of 32/64 bit ↵Dave Smith2010-04-281-2/+13
| | | | | | | | Erlang VMs
| * Refactoring app file access to be via rebar_app_utils in prep for supporting ↵Dave Smith2010-04-281-6/+3
| | | | | | | | .app.src
* | add new configuration option so_specs which allows multiple drivers to be ↵Cliff Moon2010-04-281-18/+26
|/ | | | built in the same project.
* Fix unused var warningTuncer Ayaz2010-02-251-1/+1
|
* Deal properly with env vars that have multiple = in the valueDave Smith2010-02-161-2/+2
|
* Overhaul env expansion so that rebar fully expands env refs prior to ↵Dave Smith2010-02-161-22/+78
| | | | invoking the shell script. Also now using DRV_* env vars for compilation/linking of files found in c_src; this frees up "normal" CFLAGS/LDFLAGS for usage in sub build scripts.
* Break out arch string function; update ERLANG_TARGET to include bitness of ↵Dave Smith2010-02-121-1/+1
| | | | the Erlang target
* I'm a moron. Make it a string.Ryan Tilder2010-02-101-1/+1
|
* Adding new vars for scripts to determine architecture (32/64 bit) and target ↵Dave Smith2010-02-101-1/+3
| | | | platform of Erlang VM; courtesy of rtilder
* Tweaking order of defaults so that -shared is default across platforms ↵Dave Smith2010-02-011-1/+1
| | | | unless explicitly overridden
* Removing useless debug message and extraneous newlineDave Smith2010-02-011-2/+0
|
* Tweak support for controlling so_nameDave Smith2010-01-261-2/+2
|