I'm working on porting a gnumake based build scheme
over to an Ant based scheme. One construct I can't
find in Ant is defining a varible using macros.
Here is an example where I build up a large
classpath(THIRD_PARTY_CLASSPATH) using gnumake's
foreach & subst functions. What is the analagous Ant mechanism?

### Begin gnumake Makefile stub
# Define the platform classpath separator char
empty := 
space := $(empty) $(empty)
OS_TYPE := $(shell uname)
ifeq ($(findstring NT,$(OS_TYPE)),NT)
 path_separator :=;
else
 path_separator :=:
endif

# The src location of third party jar files
SRC_3RDPARTY_JARS_DIR = $(JAVA_PROJ)/../vendorlibs/jars

# Third party jars
third_party_jars = activation.jar idate.jar imask.jar \
 inumeric.jar itime.jar jcchart361J.jar jconn40.jar \
 jgl.jar jhall.jar jndi_bundle.jar mail.jar sfc.jar \
 ssoesapi.jar xml4j.jar
third_party_src_jars = $(foreach 
jar,$(third_party_jars),$(SRC_3RDPARTY_JARS_DIR)/$(jar))
THIRD_PARTY_CLASSPATH = $(subst 
$(space),$(path_separator),$(third_party_src_jars))

### End gnumake Makefile stub


Reply via email to