Commit 91a592b4 authored by Guenter Paul Peters's avatar Guenter Paul Peters
Browse files

creation of the files for the web page added; still missing creation of archives and release

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@65 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent e001e091
......@@ -12,6 +12,11 @@ DOCDIR=doc
#the snippets for the webpage are put here
WEBDIR=web
#the html page to read the wabsnippets of (usually a package.html)
PACKAGEHTML=$(shell find $(SRCDIRS) -name package.html | tail --lines=1)
#location of the web site, may be empty
SERVER=localhost
SRVDIR=/net/www/pub/jtem/test
#directory for the dependencies
LIBDIR=lib
......@@ -51,6 +56,11 @@ TESTS=$(shell echo $(filter %Test.java Test%.java,$(TESTSOURCEFILES))\
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)
ifeq ($(strip $(SERVER)),)
copy_to_website=cp $(1) $(SRVDIR)/$(2)
else
copy_to_website=scp $(1) $(SERVER):$(SRVDIR)/$(2)
endif
.PHONY: default
default:
......@@ -79,6 +89,7 @@ $(BINDIR): $(SOURCEFILES) $(DEPS)
.PHONY: test
test: .testscompiled
#only runs tests if $(TESTDIR) is non empty
ifneq ($(strip $(TESTDIR)),)
@for test in $(TESTS); do \
echo "- JUnitTest: $$test"; \
......@@ -90,31 +101,40 @@ endif
#only compile tests if $(TESTDIR) is non empty
ifneq ($(strip $(TESTDIR)),)
@if [ ! -d $(TESTBINDIR) ]; then mkdir $(TESTBINDIR); fi
@javac $(JAVACOPTS) \
javac $(JAVACOPTS) \
-classpath `find $(LIBDIR) -name '*.jar' -printf %p:`$(JUNIT):$(BINDIR) \
-d $(TESTBINDIR)/ \
$(TESTSOURCEFILES)
touch .testscompiled
@touch .testscompiled
endif
.PHONY: javadoc
javadoc: $(DOCDIR)
$(DOCDIR): $(SOURCEFILES) $(DEPS)
if [ ! -d $(DOCDIR)]; then mkdir $(DOCDIR); fi
$(DOCDIR): $(DEPS) $(shell find $(SRCDIRS))
@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)
@touch $(DOCDIR)
.PHONY: web
web: $(WEBDIR)
$(WEBDIR): $(DOCDIR)
web: $(WEBDIR)/teaser.html $(WEBDIR)/content.html
$(WEBDIR)/teaser.html:
@if [ ! -d $(WEBDIR) ]; then mkdir $(WEBDIR); fi
@sed -e '0,/teaser start/d;/teaser end/,$$d' $(PACKAGEHTML) > $(WEBDIR)/teaser.html
$(call copy_to_website,$(WEBDIR)/teaser.html,$(NAME)/teaser.html)
$(WEBDIR)/content.html:
@if [ ! -d $(WEBDIR) ]; then mkdir $(WEBDIR); fi
@sed -e '0,/<body>/Id; /<\/body>/I,$$d' $(PACKAGEHTML) > $(WEBDIR)/content.html
$(call copy_to_website,$(WEBDIR)/content.html,$(NAME)/content.html)
blas.jar: $(BINDIR)
cd $(BINDIR); jar cf ../blas.jar *
.PHONY: debug
debug:
@echo SOURCEFILES=$(SOURCEFILES); echo
......@@ -123,6 +143,7 @@ debug:
@echo TESTS=$(TESTS); echo
@echo JUNIT=$(JUNIT); echo
@echo DOCPACKAGES=$(DOCPACKAGES); echo
@echo PACKAGEHTML=$(PACKAGEHTML); 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