Commit 48a6de4b authored by Guenter Paul Peters's avatar Guenter Paul Peters
Browse files

javadoc generation now works

still missing: release, website

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@49 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 32137f45
......@@ -27,8 +27,19 @@ TESTBINDIR=$(TESTDIR)
#where to find junit.jar
JUNIT=$(shell locate junit.jar | grep '/junit.jar' | tail --lines=1)
#compile options
JAVACOPTS=-target 1.5 -source 1.5
#javadoc options
JAVADOCOPTS= -author -protected -nodeprecated -nodeprecatedlist \
-windowtitle 'de.jtem.$(NAME) package API documentation' \
-header '<a href="http://www.jtem.de/$(NAME)" target="_top">$(NAME)</a> by<br><a href="http://www.jtem.de" target="_top">jTEM</a>' \
-footer '<a href="http://www.jtem.de/$(NAME)" target="_top">$(NAME)</a> by<br><a href="http://www.jtem.de" target="_top">jTEM</a>' \
-bottom '<font size=-1><b><a href="mailto:jtem@math.tu-berlin.de?subject=$(NAME):">jTEM</a>\
</b></font>'
#things that are removed recursively by the clean target
CLEAN=$(BINDIR) $(DOCDIR) $(WEBDIR) $(LIBDIR) $(RELEASEDIR) .lastUpdateDeps .lastUpdateDepsMinusADay .testscompiled
CLEAN=$(BINDIR) $(DOCDIR) $(WEBDIR) $(DEPS) $(RELEASEDIR) .lastUpdateDeps .lastUpdateDepsMinusADay .testscompiled
# -- Everything below should be generic - the same for all jtem projects --
......@@ -38,12 +49,14 @@ TESTSOURCEFILES=$(shell find $(TESTDIR) -name '*.java')
TESTS=$(shell echo $(filter %Test.java Test%.java,$(TESTSOURCEFILES))\
| sed -e 's,$(TESTDIR)/,,g' -e 's/.java//g' -e 'y,/,.,')
DEPS=$(patsubst %,$(LIBDIR)/%.jar, $(shell cat dependencies.txt | grep -v '^\#'))
DOCPACKAGES=$(shell find $(SRCDIRS) -name '*.java' -printf "%h\n" | \
sed -e 'y,/,.,' $(foreach d,$(SRCDIRS), -e 's/$(d)\.//') | sort -u)
.PHONY: default
default:
cat README
#dependencies will only be updated once a day
#dependencies will only be fetched once a day
.PHONY: updatedeps
updatedeps: $(DEPS)
$(DEPS): .lastUpdateDeps
......@@ -58,7 +71,8 @@ $(DEPS): .lastUpdateDeps
binaries: $(BINDIR)
$(BINDIR): $(SOURCEFILES) $(DEPS)
@if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
javac -classpath `echo $(DEPS) | tr \ :` \
javac $(JAVACOPTS) \
-classpath `find $(LIBDIR) -name '*.jar' -printf %p:` \
-d $(BINDIR)/ \
$(SOURCEFILES)
@touch $(BINDIR)
......@@ -68,7 +82,7 @@ test: .testscompiled
ifneq ($(strip $(TESTDIR)),)
@for test in $(TESTS); do \
echo "- JUnitTest: $$test"; \
java -classpath `echo $(DEPS) | tr \ :`:$(JUNIT):$(BINDIR):$(TESTBINDIR) \
java -classpath `find $(LIBDIR) -name '*.jar' -printf %p:`$(JUNIT):$(BINDIR):$(TESTBINDIR) \
junit.textui.TestRunner $$test; \
done
endif
......@@ -76,7 +90,8 @@ endif
#only compile tests if $(TESTDIR) is non empty
ifneq ($(strip $(TESTDIR)),)
@if [ ! -d $(TESTBINDIR) ]; then mkdir $(TESTBINDIR); fi
@javac -classpath `echo $(DEPS) | tr \ :`:$(JUNIT):$(BINDIR) \
@javac $(JAVACOPTS) \
-classpath `find $(LIBDIR) -name '*.jar' -printf %p:`$(JUNIT):$(BINDIR) \
-d $(TESTBINDIR)/ \
$(TESTSOURCEFILES)
touch .testscompiled
......@@ -85,11 +100,11 @@ endif
.PHONY: javadoc
javadoc: $(DOCDIR)
$(DOCDIR): $(SOURCEFILES) $(DEPS)
if [ ! -d javadocs ]; then mkdir javadocs; fi
javadoc -d javadocs -classpath classes:`echo lib/*.jar | tr \ :` -sourcepath src -protected \
-windowtitle "blas documentation" -doctitle "blas" \
-nodeprecated -nodeprecatedlist \
`find src -name .svn -prune -or -type d -print | sed -e 'y,/,.,' -e 's/src\.//'`
if [ ! -d $(DOCDIR)]; then mkdir $(DOCDIR); fi
javadoc $(JAVADOCOPTS) \
-d $(DOCDIR) -classpath $(BINDIR):`find $(LIBDIR) -name '*.jar' -printf %p:` \
-sourcepath `echo $(SRCDIRS) | tr \ :` \
$(DOCPACKAGES)
touch $(DOCDIR)
.PHONY: web
......@@ -107,7 +122,7 @@ debug:
@echo TESTSOURCEFILES=$(TESTSOURCEFILES); echo
@echo TESTS=$(TESTS); echo
@echo JUNIT=$(JUNIT); echo
@echo JUNITRUN=$(JUNITRUN); echo
@echo DOCPACKAGES=$(DOCPACKAGES); echo
.PHONY: clean
clean:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment