[Top][All Lists]

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

Re: Dollar-signs in commands

From: Paul D. Smith
Subject: Re: Dollar-signs in commands
Date: Sun, 26 Jun 2005 21:14:27 -0400

%% "Daniel Kraft" <address@hidden> writes:

  dk> In a makefile I try to execute commands containing $-signs like
  dk> this line of the makefile:

  dk>   sabcmd XML/Inhalt.xsl Index.xml Index.html $$wurzel=de

  dk> I don't really know why, but this command doesn't set the
  dk> top-level-XSLT-parameter $wurzel to de, as it should. I tried
  dk> copying this command from what make displayed it was going to
  dk> execute, and run it manually, and it worked correctly. Do you know
  dk> any problems with $-signs in commands, or similiar things?

Probably make is running a shell, like sh.exe or something.  In the
normal shell, $ introduces a shell variable.  So you have to use the
double $$ to quote it from make, then use a backslash or quotes to quote
it from the shell:

    sabcmd XML/Inhalt.xsl Index.xml Index.html \$$wurzel=de

Since you're using Windows it can be confusing to know what shell make
is using to invoke your command script, and how it's executed.  It
depends on how you've built make, etc.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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