IllegalStateException when running makegraphdependencies.jar
Closed this issue · 3 comments
When attempting to run makegraphdependencies.jar on any makefile, I get an IllegalStateException.
I have been running the jar file with make -d --dry-run | java -jar makegraphdependencies.jar
after building makegraphdependencies.jar by running ant makegraphdependencies
from the root of this repository. I have also tried running the jar file with make -dq | java -jar makegraphdependencies.jar
with equally unsuccessful results.
The error message is the same regardless of what Makefile I use. For instance, the simple Makefile
test: main.o
gcc -o test main.o
main.o: main.c
gcc -c main.c
clean:
rm *.o test
yields the error messages
Exception in thread "main" java.lang.IllegalStateException: expected Considering target file got Finished prerequisites of target file 'Makefile'.
at sandbox.MakeGraphDependencies.recursive(MakeGraphDependencies.java:103)
at sandbox.MakeGraphDependencies.run(MakeGraphDependencies.java:161)
at sandbox.MakeGraphDependencies.main(MakeGraphDependencies.java:262)
In case it's relevant, I am running it with Java 1.7.0_95 on Ubuntu 15.10
works fine here:
$ make -ndB -f jeter.mk | java -jar src/j4make/dist/j4make.jar 2> /dev/null
digraph G {
n2[label="jeter.mk"];
n4[label="main.o"];
n3[label="test"];
n5[label="main.c"];
n1[label="<ROOT>"];
n5 -> n4;
n4 -> n3;
n2 -> n1;
n3 -> n1;
}
$ cat jeter.mk
test: main.o
gcc -o test main.o
main.o: main.c
gcc -c main.c
clean:
rm *.o test
what's your version of GNU make ?
WAIT ! I thought you were talking about this tool: https://github.com/lindenb/j4make
not this old unmaintained source.
I'm closing this issue. Please ; switch to https://github.com/lindenb/j4make
Thanks for the help. I came here through some old link looking for a makefile graph generator.
I cloned j4make and it works perfectly.