For rebar builds, rather than treating ibrowse as a normal dependency even though it's used only for testing, make rebar.config.script check for the existence of a .rebar/YAWS_DEV_MODE file and only if present, add ibrowse as a dependency. This allows projects that use Yaws as a rebar dependency to avoid having to pull in ibrowse. (Credit goes to Seth Falcon for this idea; he added something like this to the Basho webmachine project for a test-only dependency there, and I borrowed his idea for Yaws.)
When using yaws as an app dependency for another application built with rebar, I noticed that testing that application with "rebar eunit" would fail while testing yaws. It was easy to work around with "rebar eunit skip_deps=true" but yaws really should pass its tests when tested via rebar. Change rebar.config to add ibrowse as a dependency. It's used only for testing, but rebar doesn't support test-only dependencies, plus it's filtered out during release generation anyway. Modify some of the test files to be able to find ibrowse include files regardless of whether they're built via make or via rebar. Also rename all non-eunit test functions ending in "_test" so they don't confuse eunit. Also had to move the embedded_yaws_id_dir test from eunit to t2 because it fails under "rebar eunit" when yaws is a dependency for another app. It fails because it calls into the yaws_api:embedded_start_conf function which tries to call application:load(yaws), but paths aren't properly set up to allow that to work under these testing circumstances. Note that not all tests currently run under rebar; building with make and then running "make test" results in many more tests being executed. Fixing this will come later.