I would like to build a java jar file  x.jar  based on changes to
any  .class  files in subtree  x .  I tried the rule

%.jar: $(shell find $* -name \*.java | sed 's/\.java$$/.class/')
        @$(RM) $@
        $(JAR) cf $@ $^

but  find  doesn't like this.  When I tried hardwiring the directory
as an experiment, like so

%.jar: $(shell find x -name \*.java | sed 's/\.java$$/.class/')
        @$(RM) $@
        $(JAR) cf $@ $^

it worked as expected.  But it seems that  $@  and  $*  are not 
expanded on the target line (i.e. in the dependecies list)!  (Hence 
why  find  complains, I think.)  

Is this correct behavior, or am I doing something wrong?  How can I 
get this to work -- it seems such a basic thing?

Please CC me, as I am not a member of this list.  Thanks!

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to