-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
75 lines (57 loc) · 2.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Make sure you have installed the catalog files for XHTML on your local filesystem
GH_PAGES=../jmock-gh-pages
CONTENT=$(shell find content -not -name '*~' -and -not -path '*/.git*')
SKIN=$(shell find templates -not -name '*.xslt' -and -not -name '*~' -and -not -path '*/.git*')
ASSETS=$(shell find assets -not -name '*~' -and -not -path '*/.git*')
JAVADOCS=$(shell find archives -name '*javadoc.zip')
ARCHIVES=$(shell find archives -name '*.zip')
OUTDIR=skinned
OUTPUT=$(CONTENT:content/%=$(OUTDIR)/%) \
$(SKIN:templates/%=$(OUTDIR)/%) \
$(ASSETS:assets/%.svg=$(OUTDIR)/%.png) \
$(JAVADOCS:archives/%-javadoc.zip=$(OUTDIR)/javadoc/%/index.html) \
$(ARCHIVES:archives/%=$(OUTDIR)/downloads/%)
all: $(OUTPUT)
$(OUTDIR)/index.html: content/news-rss2.xml
$(OUTDIR)/%.html: content/%.html templates/skin.xslt data/versions.xml
@mkdir -p $(dir $@)
xsltproc \
--nodtdattr \
--nonet \
--stringparam path $*.html \
--stringparam rpath `echo $(dir $*) | sed 's|[^/.]\+|..|g'` \
--stringparam baseuri http://www.jmock.org \
--output $@ \
templates/skin.xslt $<
$(OUTDIR)/%: content/%
@mkdir -p $(dir $@)
cp $< $@
$(OUTDIR)/%: templates/%
@mkdir -p $(dir $@)
cp $< $@
$(OUTDIR)/downloads/%: archives/%
@mkdir -p $(dir $@)
cp $< $@
$(OUTDIR)/logo.png: WIDTH=176
$(OUTDIR)/information.png: WIDTH=32
$(OUTDIR)/warning.png: WIDTH=40
$(OUTDIR)/get-it.png: WIDTH=40
$(OUTDIR)/get-started.png: WIDTH=40
$(OUTDIR)/get-training.png: WIDTH=40
$(OUTDIR)/icon.png: WIDTH=24
$(OUTDIR)/preferences.png: WIDTH=28
$(OUTDIR)/%.png: assets/%.svg Makefile
inkscape --without-gui --export-png=$@ --export-area-drawing --export-area-snap --export-width=$(WIDTH) $<
$(OUTDIR)/javadoc/%/index.html: archives/%-javadoc.zip
@mkdir -p $(@D)
@rm -r $(@D)
@unzip -q -d $(dir $(@D)) $<
clean:
rm -rf $(OUTDIR)/
again: clean all
SCANNED_FILES=content templates assets data Makefile archives
published: all
rm -r $(GH_PAGES)/*
cp -r $(OUTDIR)/* $(GH_PAGES)/
@echo ">>>>>>>>>>> commit and push $(GH_PAGES) to github <<<<<<<<<<<<<<<<<"
# rsync --recursive --checksum --delete --cvs-exclude --compress --stats --verbose --rsh=ssh $(OUTDIR)/* $(SITE)