Move to shell build

This commit is contained in:
Neale Pickett 2014-08-27 22:53:08 +00:00
parent f15d25eb60
commit f9c4bbac91
9 changed files with 11 additions and 98 deletions

View File

@ -1,49 +0,0 @@
DESTDIR = /srv/http/woozle.org
TEMPLATE = template.html.m4
MDWNTOHTML = ./mdwntohtml $(TEMPLATE)
# HTML to be generated
HTML =
# Things to copy
COPY =
# Directories in which %.mdwn generates %.html
PLAIN =
# Other targets for "make all"
TARGETS = html copy images
all: default
-include *.mk */*.mk
$(DESTDIR)/%.html: %.mdwn $(TEMPLATE)
@mkdir -p $(dir $@)
$(MDWNTOHTML) < $< > $@
$(DESTDIR)/%: %
@mkdir -p $(dir $@)
cp $< $@
$(DESTDIR)/%-sm.jpg: %.jpg
jpegtopnm $< | pnmscale -xysize 400 400 | pnmtojpeg > $@
$(DESTDIR)/tmp:
mkdir -p $@
$(DESTDIR)/footer.xml: $(TEMPLATE)
awk '(/FOOT/) { a += 1; next; } (a == 1) { print; }' $< > $@
default: $(TARGETS)
MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN)))
HTML += $(patsubst %.mdwn, %.html, $(MDWN))
html: $(addprefix $(DESTDIR)/, $(HTML))
copy: $(addprefix $(DESTDIR)/, $(COPY))
images: $(addprefix $(DESTDIR)/, $(IMAGES))
clean:
rm -rf $(wildcard $(DESTDIR)/*)

View File

@ -1,4 +0,0 @@
PLAIN += birds
COPY += $(wildcard birds/*.png)
COPY += $(wildcard birds/*.jpg)
COPY += $(wildcard birds/*.gif)

View File

@ -1,5 +0,0 @@
PLAIN += derby
COPY += derby/scrimmage.pdf derby/lineup.pdf
$(DESTDIR)/derby/%.pdf: derby/%.ps
ps2pdf $< $@

11
derby/install Executable file
View File

@ -0,0 +1,11 @@
#! /bin/sh
DESTDIR=${1:-/srv/http/woozle.org/derby}
for src in *.ps; do
target=$DESTDIR/${src%.ps}.pdf
if older $target $src; then
echo "PDF $src"
pstopdf $src $target
fi
done

View File

@ -1 +0,0 @@
PLAIN += led-scoreboard

View File

@ -1,15 +0,0 @@
PLAIN += scoreboard
COPY += scoreboard/screenshot.png
COPY += scoreboard/logos.html
COPY += scoreboard/others.html
COPY += scoreboard/other-browsers.png
COPY += scoreboard/chrome.png
TARGETS += $(DESTDIR)/scoreboard/live/index.html
$(DESTDIR)/scoreboard/live/.git:
cd $(DESTDIR)/scoreboard; git clone /home/neale/projects/derby/scoreboard live
$(DESTDIR)/scoreboard/live/index.html: $(DESTDIR)/scoreboard/live/.git
$(DESTDIR)/scoreboard/live/index.html: /home/neale/projects/derby/scoreboard
cd $(DESTDIR)/scoreboard/live; git pull

View File

@ -1,7 +0,0 @@
TARGETS += $(DESTDIR)/track/index.html
$(DESTDIR)/track/.git:
cd $(DESTDIR); git clone /home/neale/projects/derby/track
$(DESTDIR)/track/index.html: $(DESTDIR)/track/.git
cd $(DESTDIR)/track; git pull

View File

@ -1,12 +0,0 @@
PLAIN += .
COPY += icon.png style.css style-black.css set.cgi $(TEMPLATE)
COPY += google7f698b9893809122.html
HTML += people.html
COPY += robots.txt
COPY += derbygirl.png
$(DESTDIR)/people.html: people.sh template.html.m4
sh $< | $(MDWNTOHTML) > $@
$(DESTDIR)/%.cgi: %.cgi.c
$(CC) -Wall -Werror -o $@ $<

View File

@ -1,5 +0,0 @@
PLAIN += $(wildcard xmas/*)
XMAS_IMAGES = $(wildcard xmas/*/*.jpg)
XMAS_IMAGES_SC = $(patsubst %.jpg, %-sm.jpg, $(XMAS_IMAGES))
IMAGES += $(XMAS_IMAGES) $(XMAS_IMAGES_SC)