1

I'm looking for a way to write the standard output of my nmake call to a specified file. I tried something like "nmake target > file.log", but this won't work. Moreover I call multiple nmakes from within my MAKEFILE and may use multiple log-files to keep track of the output. I've only found the nmake option to write errors to a file but what's about the standard output.

Is there a simple way to do that (in Windows)?

MrCube
  • 245
  • 2
  • 9
  • 1
    it works for me. `nmake target > log.out` produces a file that contains the output of the make session. Can you provide a makefile that produces the behavior you are reporting here? – Cheeso Apr 09 '12 at 19:41

2 Answers2

1

@Cheeso I've tried to built simple example and noticed that it doesn't work for me because the MAKEFILE must running in elevated mode. Consider a makefile like this:

default:
 REM Test

and a batch-file like this:

cd /d "%~dp0"
nmake output.log
pause

When running the batch-file as administrator it doesn't redirect the stdout to my file and returns an error.

MrCube
  • 245
  • 2
  • 9
  • I'm sure it has something to do with the elevated mode and the `cd /d "%~dp0"` which is needed to run the MAKEFILE directly located besides the batch-file. – MrCube Apr 10 '12 at 07:54
0

jom is really picky, and it's made based on nmake. Since that's the case, we're probably dealing with the same pickiness.

This works : jom -j 8 >> build.log

While this doesn't work : jom -j 8>>build.log

Add some whitespace, and you should be good to go. This was incredibly annoying for me too with Qt 5.6.1-1. I even tried using Powershell transcripts, but that ended up being a complete bust.

kayleeFrye_onDeck
  • 6,648
  • 5
  • 69
  • 80