Hello all.

I wonder if there is a simpler, more direct way to do the following:

package := example

$(classfiles)/$(package)/%.class: $(src)/$(package)/%.java
        @echo "Compiling $@..."
        @$(javac) $^

$(classfiles)/$(package)/%.class: $(tests)/$(package)/%.java
        @echo "Compiling $@..."
        @$(javac) $^

package := util

$(classfiles)/$(package)/%.class: $(src)/$(package)/%.java
        @echo "Compiling $@..."
        @$(javac) $^

$(classfiles)/$(package)/%.class: $(tests)/$(package)/%.java
        @echo "Compiling $@..."
        @$(javac) $^


I typically use a single make file for each project, and I'm developing in
Java.
For each package, I define two pattern rules: one for ordinary classes, and
another for test cases. Test source code is kept in a separate directory
tree
so that it won't show up in the API documentation (if such documentation is
necessary).

I'd like to not have to edit this portion of my make file each time I add a
new package. I know this isn't much of a burden, but I still wonder if there
is a more elegant solution.

Thanks in advance,

Charles.


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

Reply via email to