Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make output redirection

Tags:

bash

macos

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.
like image 791
Talespin_Kit Avatar asked Sep 16 '25 18:09

Talespin_Kit


1 Answers

Should be

make 2>&1 > ~/tmp/build.log
like image 154
sehe Avatar answered Sep 18 '25 08:09

sehe