Simon - 2006-03-30

I tried to make and install this package. However there were a couple of problems coming up, mostly related to the Makefile. I have it running now, but I want to suggest a few improvements. This is part of the "old" Makefile of the current avetanaBT package:

# Call the make all directives in both the C and Java Makefiles.
all: jar javadoc csource

    make -C c
    jar uvf $(BIN_DIR)/avetanaBT.jar $(BIN_DIR)/

I have a SUSE 9.3 which has a GNU jar implementation in the search path (/usr/bin/) that does not support the u action. You better use
here, because you require JDK_HOME to be defined. The jar of the JDK does support the u action. In addition this line puts the .so file in the build directory within the jar file. However your loader looks for it in the root directory of the jar file. All in all this line should look like
    $(JDK_HOME)/bin/jar uvf $(BIN_DIR)/avetanaBT.jar -C $(BIN_DIR)

    @find {de,com,javax} -iname *.java > javaSourceFiles

# Compile the source code into Java classes.
classes: javaSourceFiles
    mkdir -p build
    javac -d build @javaSourceFiles
# Create the Java archive of the avetanaBT package.
jar:  classes
    jar cvf $(BIN_DIR)/avetanaBT.jar de javax com

This line collects the files in ./de ./javax and ./com into the jar file. However these are the source code file (.java). The class files are in ./build/de, ./build/javax ./build/com. Thus we need the -C option.
    $(JDK_HOME)/bin/jar cvf $(BIN_DIR)/avetanaBT.jar -C $(BIN_DIR) de javax com

# Create Javadoc documentation for the avetanaBT package.

# Call the make clean directives in both the C and Java Makefiles.
    make -C c clean
    rm -rf javadoc
    rm -f $(BIN_DIR)/avetanaBT.jar
    rm -f $(BIN_DIR)/
    rm -f javaSourceFiles
    rm -f tmp*
    rm -f
    rm -rf $(BIN_DIR)/build/javax
    rm -rf $(BIN_DIR)/build/com
    rm -rf $(BIN_DIR)/build/de
The clean action seems out-dated too. I'm not sure how it should look like. But I guess one major action should be rm -rf $(BIN_DIR)/*

I hope this will help you to make your module running on several platforms.

Best regards, Simon