This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin bash script removing equal sign


On 4/25/2019 12:11 PM, Peter Palaparthy wrote:
Cygwin bash script is removing equals sign from command call. How do I
escape it so that = is sent to command?

I tried different things like escaping = with \ and enclosing it with ""
and '' but none of them worked.

*Here is the relevant command in my makefile.*


*$(elabcmd) = $(XELAB_DEFAULT) \-generic VERSION=10*


*compile:$(elabcmd)*

*Here is the result:*

cygwin prompt:> make compile
*Running: xelab.exe -generic VERSION 10*

*(note that the equal sign is not there)*

I want
*xelab.exe -generic VERSION=10*

- I am not sure you need the \ on the -
- I wonder about the $(elabcmd) = ...   My expectation would
  be elabcmd = ...
- compile: ... is giving a dependency.  It seems you want a rule.
  In make, this would look more like:

compile: xelab.exe
	xelab.exe -generic VERSION=10

Making this more parameterized:

elabcmd = xelab.exe -generic VERSION=10

compile: xelab.exe
	$(elabcmd)

(Note: There is a TAB (not space), before that last $(elabcmd).)

Anyway, while I am happy to help a little, this is a generic Make question,
not specific to Cygwin ...

EM

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]