[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Preventing recursive expansion of symbols containing "$"?
From: |
Adrian Lumsden |
Subject: |
Preventing recursive expansion of symbols containing "$"? |
Date: |
Tue, 30 Apr 2002 16:48:12 +1200 |
I have a makefile for building the Java application that I am working on. It
has a target to build and execute the application:-
# This target builds the software and then runs it
and_run : \
${TARGET} \
RunIt
RunIt is a PHONY:-
.PHONY: RunIt
RunIt:
@echo .
@echo Running ${TARGET}
@echo .
@echo JRFLAGS = ${JRFLAGS}
@echo NI_JRFLAGS = ${NI_JRFLAGS}
@echo .
@java -version
@echo .
@echo .
@echo java ${TARGET}
java ${JRFLAGS} ${RCP} ${NI_JRFLAGS} ${TARGET}
JRFLAGS and RCP are symbols defined in the makefile like this:-
JRFLAGS = -Xmx192M -server
RCP = ${CCP}
NI_JRFLAGS is intended to be an environment variable which allows me to specify
some more Java runtime flags without having to
change the makefile. I have:-
set NI_JRFLAGS=-Ddebug.CallContext -Ddebug.PositionToCommand
-Ddebug.NIProgressBar$MouseHandler
So what I'm doing here is to define (-D) some symbols which get passed to the
Java program. These ones are for debug support as
you've probably guessed.
My problem is that "$" in the string in the NIProgressBar$MouseHandler. When
make sees it it takes it as a variable and attempts
recursive definition (which fails). This stuffs up the command line.
I have found the ":=" operator in GNU make but it doesn't help me. It makes the
symbol that is being defined as a non-recursive
expansion symbol. If it also meant "carry out non-recursive expansion of the
rhs" then it would help but it doesn't.
Any suggestions?
with regards,
Adrian Lumsden
- -------------------------------------------
Adrian Lumsden Product Specialist
Scientific Software and Systems Limited
DDI: +64 4 917-6680
Tel: +64 4 917-6670
Fax: +64 4 917-6671
E-mail: address@hidden
Visit us on the Web at: http://www.sss.co.nz
_____________________________________________
This e-mail passed SSS's content security scan.
It is covered by the confidentiality clauses at
http://www.sss.co.nz/content_and_confidentiality
- Preventing recursive expansion of symbols containing "$"?,
Adrian Lumsden <=