public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin bash script removing equal sign
@ 2019-04-25 16:11 Peter Palaparthy
  2019-04-25 19:12 ` Eliot Moss
  2019-04-25 19:26 ` Hans-Bernhard Bröker
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Palaparthy @ 2019-04-25 16:11 UTC (permalink / raw)
  To: cygwin

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*


Thanks for any help.

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin bash script removing equal sign
  2019-04-25 16:11 Cygwin bash script removing equal sign Peter Palaparthy
@ 2019-04-25 19:12 ` Eliot Moss
  2019-04-25 19:26 ` Hans-Bernhard Bröker
  1 sibling, 0 replies; 3+ messages in thread
From: Eliot Moss @ 2019-04-25 19:12 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin bash script removing equal sign
  2019-04-25 16:11 Cygwin bash script removing equal sign Peter Palaparthy
  2019-04-25 19:12 ` Eliot Moss
@ 2019-04-25 19:26 ` Hans-Bernhard Bröker
  1 sibling, 0 replies; 3+ messages in thread
From: Hans-Bernhard Bröker @ 2019-04-25 19:26 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 637 bytes --]

Am 25.04.2019 um 18:11 schrieb Peter Palaparthy:
> Cygwin bash script is removing equals sign from command call. 

On what basis did you conclude it was bash doing that, and not, say, make?

> *Here is the relevant command in my makefile.*

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

I believe for that to be a syntactically valid line in a Makefile would
take some more Makefile code on top of it.  If you don't show the actual
file you use (or a suitably trimmed, yet self-contained abstract of it),
you're making it impossibly hard for people to help you.

> *compile:$(elabcmd)*

Same problem here.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-25 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 16:11 Cygwin bash script removing equal sign Peter Palaparthy
2019-04-25 19:12 ` Eliot Moss
2019-04-25 19:26 ` Hans-Bernhard Bröker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).