Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nmake.exe keeps complaining about flags I'm not giving it. (U1065)

When I run nmake.exe from make I get this error:

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1065: invalid option '-'

But I'm not passing in '-' as an option anyplace.

If I run the same command from outside of make it works correctly.

like image 651
docwhat Avatar asked Dec 29 '09 15:12

docwhat


1 Answers

The problem is that the environment variables MAKE and MAKEFLAGS are set by make. These are confusing nmake.exe.

To fix this, just prefix your call to nmake.exe with env -u MAKE -u MAKEFLAGS

Example:

 some-make-target:
      env -u MAKE -u MAKEFLAGS nmake.exe /a /l
like image 75
docwhat Avatar answered Sep 19 '22 23:09

docwhat