从 ruby 脚本调用 gnu makefile?
calling gnu makefiles from ruby script?
在放置 gnu makefile 的目录中调用命令 "make" 只需使用以下命令即可在批处理脚本中轻松完成:
make
有没有办法从 ruby 脚本执行命令 "make"?
如果你想使用ruby
制作make文件
mkmf.rb 被 ruby C 扩展用来生成一个 Makefile,它将正确编译,link C 扩展到 ruby 和第三方库。
create_makefile('test/foo', 'test')
That will set the target_prefix in the generated Makefile to “test”.
That, in turn, will create the following file tree when installed via
the make install command: /path/to/ruby/sitearchdir/test/foo.so
更多内容MKMF
我想执行任何命令使用 Kernel#system
system("make")
在放置 gnu makefile 的目录中调用命令 "make" 只需使用以下命令即可在批处理脚本中轻松完成:
make
有没有办法从 ruby 脚本执行命令 "make"?
如果你想使用ruby
制作make文件mkmf.rb 被 ruby C 扩展用来生成一个 Makefile,它将正确编译,link C 扩展到 ruby 和第三方库。
create_makefile('test/foo', 'test')
That will set the target_prefix in the generated Makefile to “test”. That, in turn, will create the following file tree when installed via the make install command: /path/to/ruby/sitearchdir/test/foo.so
更多内容MKMF
我想执行任何命令使用 Kernel#system
system("make")