[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$ in filenames
From: |
Norbert Kiesel |
Subject: |
$ in filenames |
Date: |
Mon, 12 Dec 2005 19:19:47 -0800 |
User-agent: |
Debian Thunderbird 1.0.7 (X11/20051017) |
Hi,
my makefiles broke after upgrading to make 3.81 (as shipped in Debian
unstable). Reason is the new "second evaluation" which mangles my
filenames with '$' in them. In case you wonder: these are generated by
Java for .class files generated for inner classes. Is there a
make-version independant way to fix this?
What I currently do is a very ugly hack (which only works because on all
other platforms I use 3.80):
ifneq ($(MAKE_VERSION),3.80)
CLASS_FILES := $(subst $$,$$$$,$(CLASS_FILES))
endif
foo.jar: $(CLASS_FILES)
jar cf $@ $(subst $$,\$$,$^)
(The subst in the jar line is needed to protect the $ from shell evaluation)
I tried something along the lines of
.PHONY: a$$b
foo: a$$b
@echo $(if $(filter a$$b, $^),old make,new make)
which prints "old make" in pre 3.81 and "new make" in 3.81 (and later,
I'd assume). However, I can't figure out how to use this in my rules.
Any help/ideas/comments?
Thanks,
Norbert
- $ in filenames,
Norbert Kiesel <=