使输出重定向 [英] make output redirection

查看:132
本文介绍了使输出重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重定向make命令的输出和错误流文件。

下面的命令

 让1 GT;和2〜/ tmp目录/ build.log

引发以下错误

 制作:为`/Users/m/tmp/build.log'做什么也没有。

编辑: -

尝试

 使2  - ;&放大器; 1〜/ tmp目录/ build.log

 让〜的/ tmp / build.log 2  - ;&放大器; 1

这给了相同的上述错误信息。

我使用的是Mac豹OS

  $的bash --version
GNU bash的版本3.2.48(1) - 释放下(x86_64-苹果darwin10.0)
版权所有(C)2007自由软件基金会
Tietos的iMac-2:QT-构建PTOOLS $ SH --version
GNU bash的版本3.2.48(1) - 释放下(x86_64-苹果darwin10.0)
版权所有(C)2007自由软件基金会


解决方案

 使2  - ;&放1 GT; 〜/ tmp目录/ build.log

I want to redirect the output and error stream of make command to file.

The following command

make 1>&2 ~/tmp/build.log

throws the following error

make: Nothing to be done for `/Users/m/tmp/build.log'.

EDIT:-

Tried

make 2>&1 ~/tmp/build.log

and

make ~/tmp/build.log 2>&1

which gave the same above error message.

I am using mac-leopard os

$ bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
Copyright (C) 2007 Free Software Foundation, Inc.
Tietos-iMac-2:qt-build ptools$ sh --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
Copyright (C) 2007 Free Software Foundation, Inc.

解决方案

Should be

make 2>&1 > ~/tmp/build.log

这篇关于使输出重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆