Add a --output=<DIR> option to ar to allow the specifying of an output directory.
authorFangrui Song <i@maskray.me>
Wed, 30 Oct 2019 10:50:23 +0000 (10:50 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 30 Oct 2019 10:50:23 +0000 (10:50 +0000)
commit197245e341aeb1b5da8ee5fbe5d6c49de650fb89
tree046f13d6fd30949d79ec6c7eb88b1d39834c0824
parenta961a1e1749443516d8fe6e0570cf808a09e8f89
Add a --output=<DIR> option to ar to allow the specifying of an output directory.

* ar.c (emum long option numbers): Declare.  Use to provide
numerical values for long options.
(long_options): Add --output option.
(usage): Mention the --output option.
(open_output_file): New function.  Create a filepath for an output
file and open it.
(extract_file): Use open_output_file().
(open_output_file):
* testsuite/binutils-all/ar.exp: Add a test of the new feature.
* doc/binutils.texi: Document the new feature.
* NEWS: Mention the new feature.
binutils/ChangeLog
binutils/NEWS
binutils/ar.c
binutils/doc/binutils.texi
binutils/testsuite/binutils-all/ar.exp