Feedback embedded below…

Le dim. 7 juin 2020 à 23:04, Karl Berry <k...@freefriends.org> a écrit :
>
[...]
> That is not a problem in principle. A given source file can be specified
> to generate multiple outputs.
>
> foo.class bar.class: foo.java
>        javac ...
>

OK, make can handle several outputs foo.class and bar.class for a single
input foo.java, but this is not the issue I had in mind. The issue is
how to derive the name bar.class from the name foo.java using the Make
language.

Ok, you probably can do something like that (not tested)

define class_names
$(shell if [ -f $(1).class ]; \
  then find . -iname '$(1)*.class'; \
  else echo "$(1).class"; fi)
endef

$(call class_names,%): %.java
       javac …



>     delegating java compilation to ant would be preferable.
>
> Definitely not. -k

One could make everybody happy if the makefile was generated by automake,
and ant could be used is available, otherwise we would resort to brute
force compiling all the java files when only one of them is changed, or
when just the time stamps are changed while the content is unchanged.

   V.

Reply via email to