bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Nmake from GNU-make


From: Gisle Vanem
Subject: Re: Using Nmake from GNU-make
Date: Wed, 24 Jun 2020 19:02:45 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Eli Zaretskii wrote:

gnss_libf2c.lib:
    cd libf2c ; nmake.exe -nologo -f Makefile.VC all
    cp libf2c/vcfc2.lib $@

but Nmake errors with:
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.

    NMAKE : fatal error U1065: invalid option '-'
    Stop.

Does this happen even if you remove the "cd libf2c" part?  That is,
are you saying that any invocation of NMake from a MinGW-built GNU
Make causes this problem?

The 'cd' doesn't matter. And BTW the GNU-make is built using
MSVC (by myself).

But I discovered that maybe the 'MAKEFLAGS' picked up by NMake
is to blame. Since:
  make -f GNUmakefile FOO_BAR=whatever

triggers the same previous error. But a:
   make -f GNUmakefile

works fine!?

There are some details on MAKEFLAGS here:
  
https://docs.microsoft.com/en-us/cpp/build/reference/makefile-preprocessing-directives?view=vs-2019

What happens if you use redirection, or in some other way force GNU
Make to invoke NMake via a batch file?

Probably worth a try.

> And one more idea: did you try to use '/' as the NMake option
> character instead of '-' ?

No difference. All (?)/most MS tools handle both '/' and '-'.


--
--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]