How to replace a forward slash with 2 backslashes ?
Posted on 2003-02-20
I have a Makefile that compiles Java files.
Because Sun JDK 1.1.8 on Windows requires backward slashes
in the file name, I need to replace each forward slash
in the filename with 2 backslashes.
Here is the rule I am using to compile:
@mkdir -p $(dir $@)
$(JAVAC) -classpath "src;$(CLASSPATH)" -d \
$(dir $@) src/$*.java
So, what I want is in the last line to change src/$*.java
so that it contains doubled backslashes instead of forward slashes.