I tried all day to get this work to work. Basically I need to create a makefile to create my project from its sources. I am a little versed in Linux, but not really, and I am a complete beginner in makefile.
I have tried many examples from across the network and everyone complains that they have no dependencies. Others have suggested using Ant or Mavern, but this is not possible because the exact delivery notification:
Quote from specification
Your view should consist of a single file comp2010.tar suitable for use on a Linux system. This should contain the Makefile and all sources. You do not have .class files. Your Makefile should build the tool from Java sources. the main class should be called Blaze. In a short, (automatic) testing process will consist of:
tar xf comp2010.tar
make
java Blaise < test.file > testout 2> testerr
These commands will be executed in an empty directory in a standard departmental Linux training environment with Java 1.6. CLASSPATH will include ANTLR Bank, version 3.2.
NOTE. Make sure your presentation can be compiled and executed on a standard departmental machine. Make sure you use the correct version of Java and that you are not using absolute paths. If you use any external libraries, you must also submit them.
So, you see that I cannot configure any environment variables since the machine to start is not mine and I am not allowed access to the administrator. I cannot transfer class files, so the make file is not for me, and the Ant / Mavern scripts will not work, because the testing procedure is automated and uses this make file, and all that I am allowed to use is .java files. Therefore, I need to create a make file, and it is not.
The structure of the source is as follows:
SIC \ Package1 * .java
SIC \ Package2 * .java
automatically generated \ package Hotel * .java
There are source files in all 3 folders required for compilation. The Main () method is in src \ Package1 \ 1.java
Each of these directories is a package in Eclipse, and these 3 packages are dependent on each other, as well as the external Jar file antlr-3.2.jar
So how do I make this make file. This is my question, and I made my own attempt below:
JAVAC = javac CLASS_FILES = src/package1/1.class auto-generated/packageA/2.class auto-generated/packageA/3.class auto-generated/packageA/4.class src/Package2/5.class src/Package2/6.class src/Package2/7.class src/Package2/8.class src/Package2/9.class src/Package2/10.class src/Package2/11.class src/Package2/12.class antlr-3.2.jar.* Default: $(CLASS_FILES) %.class: %.java $(JAVAC) $< clean: $(RM) *.class
This happens with errors like "org.antlr.runtime does not exist", it is inside antlr-3.2.jar. I am alone with myself and must give up soon. I assume that I am just importing the jar incorrectly and maybe I need to use any CLASSPATH. I'm sorry if this is a simple question, but I tried six hours to make one of them. Any help you could give would be most appreciated.
Regards Feldoh