操作
バグ #2127
完了rtm-skelwrapperでファイルの生成先を指定できるようにする
開始日:
2011/05/21
期日:
進捗率:
100%
予定工数:
説明
岡田先生より
http://openrtm.org/svnroot/OpenRTM-aist/trunk/OpenRTM-aist/utils/rtm-skelwrapper/skel_wrapper.py
ですが,これは,idlファイルを同じディレクトリにStub/Skelファイルを書き出す仕様に
なっている様に思いますが,outoput-dirなどのオプションなりなんなりで書き出す場所を
変えられるようになっているとうれしいです.
具体的にはapt-getでopenhrpをインストールすると,/opt/grxというユーザ書き出し不可の
領域にidlがある時にこまるんじゃないかと,思います.
n-ando さんが14年以上前に更新
オプション --output-dir/-o を追加
Usage: rtm-skelwrapper [OPTIONS]
Options:
[--help or -h] Print this help.
[--idl-file[=IDL_file]] IDL file name
[--skel-suffix[=suffix]] Suffix of server skelton files
[--stub-suffix[=suffix]] Suffix of client stub files
[--include-dir[=dir] or -I] include prefix in #include
[--output-dir[=dir] or -o] output directory
Example:
$ rtm-skelwrapper --idl=file=<IDL path>/<IDL basename>.idl
--include-dir=<include dir>
--output-dir=<output dir>
-skel-suffix=<skel suffix>
-stub-suffix=<stub suffix>
In this case, the following files are generated under <output dir>.
<IDL basename><skel suffix>.h
<IDL basename><skel suffix>.cpp
<IDL basename><stub suffix>.h
<IDL basename><stub suffix>.cpp
And these files include the target IDL file by the following
#include directive.
#include <<include dir>/<IDL basename>(CORBA impl specific suffix)>
Absolute path is not recommended for the "--include-dir" option.
When option "--include-dir=my/idl" is specified, the generated
skeleton's header includes actual CORBA implementation dependent
skeletons as follows.
#if defined ORB_IS_TAO
# include "my/idl/RangerC.h"
# include "my/idl/RangerS.h"
#elif defined ORB_IS_OMNIORB
# include "my/idl/Ranger.hh"
#endif
Therefore, if you compile this skeletons/stubs, you have to specify an
appropriate include directory in the compiler options.
<IDL path> is used for only include-guard. For example, if
"--idl-file=/usr/include/idl/MyInterface.idl" is specified, the
following include guard will be defined.
#ifndef _USR_INCLUDE_IDL_MYINTERFACE_H
#define _USR_INCLUDE_IDL_MYINTERFACE_H
: (codes)
#endif // _USR_INCLUDE_IDL_MYINTERFACE_H
操作