Macro question

2015-12-09 Thread Gisle Vanem
I have a question regarding a GNU-make macro like this (which I use to link a MSVC .dll): define do_link_DLL link $(LDFLAGS) -dll -out:$(1) -implib:$(2) \ -pdb:$(1:.dll=.pdb) -map:$(1:.dll=.map) $(3) > link.tmp cat link.tmp >> $(1:.dll=.map) rm -f $(2:.lib=.exp) link.tmp

Re: Macro question

2015-12-09 Thread David Boyce
First, I think there’s some missing context as you seem to have an unusual environment. You’re mixing Unix (cat, rm) and Windows (link) invocations; is it Cygwin, GNUWin32, MKS, ??? Second, I suspect the macro is a red herring and thus this is not really a “Macro question”. The macro should just

Re: Macro question

2015-12-09 Thread Eli Zaretskii
> From: Gisle Vanem > Date: Wed, 9 Dec 2015 16:19:39 +0100 > > I have a question regarding a GNU-make macro like this > (which I use to link a MSVC .dll): > > define do_link_DLL > link $(LDFLAGS) -dll -out:$(1) -implib:$(2) \ > -pdb:$(1:.dll=.pdb)

Re: Macro question

2015-12-09 Thread Gisle Vanem
Eli Zaretskii wrote: > The Windows shell understands || and && between 2 commands. I think > you already know that, so I'm quite sure I'm missing something here, > because that's the first thing I'd try. There is no Windows shell (cmd nor 4nt) involved here. I don't have any 'SHELL' in the

Re: Macro question

2015-12-09 Thread Eli Zaretskii
> From: Gisle Vanem > Date: Wed, 9 Dec 2015 18:20:47 +0100 > > Eli Zaretskii wrote: > > > The Windows shell understands || and && between 2 commands. I think > > you already know that, so I'm quite sure I'm missing something here, > > because that's the first thing I'd try. >

Re: Macro question

2015-12-09 Thread Gisle Vanem
cro is a red herring and thus this is not > really a “Macro question”. The macro should just expand to the same > text you’d get by typing it out. What happens when the macro is > replaced by the equivalent 3-line recipe? The same result. I tried changing the command to: .ONESHELL: wiretap.