scripts: support -I <dir> -L <dir> and -l <lib> for cl in compile
authorPeter Rosin <peda@lysator.liu.se>
Tue, 6 Mar 2012 08:14:50 +0000 (09:14 +0100)
committerPeter Rosin <peda@lysator.liu.se>
Tue, 6 Mar 2012 08:14:50 +0000 (09:14 +0100)
commit8902f83dcd7874d57d88f742bd4c62724634cc82
treeb7afea0df72276d8dd0a186c1f3cbfb5216464e9
parent54a402e5e624bebdfef421512faecf5e4f3463ab
scripts: support -I <dir> -L <dir> and -l <lib> for cl in compile

POSIX mandates that the compiler accepts a space between the -I,
-l and -L options and their respective arguments.  See
http://pubs.opengroup.org/onlinepubs/000095399/utilities/c99.html

* lib/compile (func_cl_dashl): New function with factored out code
for implementing the -l option for the cl wrapper.
(func_cl_dashL): New function with factored out code implementing
the -L option for the cl wrapper.
(func_cl_wrapper): Use func_cl_dashl to implement both -l <lib>
and -l<lib>, and func_cl_dashL to implement both -L <dir> and
-L<dir>.  Also add support for -I <dir>.
(scriptversion): Update.
* tests/compile3.test: Test both with and without a space between
-I, -l and -L and their respective arguments.
* tests/compile5.test: Likewise.
* tests/compile6.test: Likewise.
* tests/compile3.test: Likewise.
* NEWS: Update.
NEWS
lib/compile
tests/compile3.test
tests/compile4.test
tests/compile5.test
tests/compile6.test