Commit 9d2318f0 authored by Guenter Paul Peters's avatar Guenter Paul Peters
Browse files

last change date fixed

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@108 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 09f2ea86
......@@ -13,7 +13,7 @@ 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=$(subst package.html,package-summary.html,$(subst $(firstword $(SRCDIRS)),$(DOCDIR),$(shell find $(firstword $(SRCDIRS)) -name package.html | tail --lines=1)))
PACKAGEHTML=$(DOCDIR)/de/jtem/$(NAME)/package-summary.html
#location of the web site, may be empty
SERVER=
#directory of the website on the server, or local if SERVER is empty
......@@ -22,7 +22,8 @@ SRVDIR=/net/www/pub/jtem/test
#directory for the dependencies
LIBDIR=lib
#a place to put the files that constitute a release
#a place to put the archives that constitute a release, before copy to
#web site
RELEASEDIR=release
#directories of the JUnit tests, all files that match Test*.java or *Test.java will be executed
......@@ -50,7 +51,11 @@ CLEAN=$(BINDIR) $(DOCDIR) $(WEBDIR) $(DEPS) $(RELEASEDIR) .testscompiled `find $
#jtem site url
JTEMURL=http://www.math.tu-berlin.de/jtem
# -- Everything below should be generic - the same for all jtem projects --
# ----------------------------------
# Everything below should be generic
# ----------------------------------
SOURCEFILES=$(shell find $(SRCDIRS) -name '*.java')
TESTSOURCEFILES=$(shell find $(TESTDIR) -name '*.java' 2> /dev/null)
......@@ -64,9 +69,9 @@ DOWNLOADDEPS=$(JTEMURL)/downloads
#copy to SRVDIR
ifeq ($(strip $(SERVER)),)
copy_to_website=cp $(1) $(SRVDIR)/$(2)
copy_to_website=cp -a $(1) $(SRVDIR)/$(2)
else
copy_to_website=scp $(1) $(SERVER):$(SRVDIR)/$(2)
copy_to_website=scp -r $(1) $(SERVER):$(SRVDIR)/$(2)
endif
#execute on SERVER
ifeq ($(strip $(SERVER)),)
......@@ -74,6 +79,12 @@ ifeq ($(strip $(SERVER)),)
else
exec_on_server=ssh $(SERVER) $(1)
endif
#last change date from svn
svndate=svn info $(1) 2> /dev/null \
| sed -n '/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/s/.*\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\).*/\1/p' \
| tail -n 1
# ---Targets --
.PHONY: help
help:
......@@ -99,7 +110,7 @@ binaries: $(BINDIR)
$(BINDIR): $(SOURCEFILES) | $(DEPS)
@if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
javac $(JAVACOPTS) \
-classpath `find $(LIBDIR) -name '*.jar' -printf %p: || echo :` \
-classpath `find $(LIBDIR) -name '*.jar' -printf %p: 2> /dev/null || echo :` \
-d $(BINDIR)/ \
$(SOURCEFILES)
@touch $(BINDIR)
......@@ -138,7 +149,10 @@ $(DOCDIR): $(shell find $(SRCDIRS)) | $(DEPS)
.PHONY: web
web: $(WEBDIR)/teaser.html $(WEBDIR)/content.html
@for f in $?; do $(call copy_to_website,$$f,$(NAME)/$${f#$(WEBDIR)}); done
@$(call exec_on_server,touch $(SRVDIR)/$(NAME)/index.html)
@if [ -d $(dir $(PACKAGEHTML))/doc-files ]; then $(call copy_to_website,$(dir $(PACKAGEHTML))/doc-files,$(NAME)/doc-files); fi
@date=`$(call svndate, $(subst -summary,,$(subst $(DOCDIR),$(firstword $(SRCDIRS)),$(PACKAGEHTML))))`; \
if [ "" = "$$date" ]; then date=`date -r $< +%F`; fi; \
$(call exec_on_server,touch -d $$date $(SRVDIR)/$(NAME)/content.html)
$(PACKAGEHTML): $(DOCDIR)
......
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