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




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to