|
|
@ -22,24 +22,26 @@ SRCPAGES := $(shell find $(SRCDIR)/pages/* -name '*.scm') |
|
|
|
SRCSTYLES := $(shell find $(SRCDIR)/styles/* -name '*.scm')
|
|
|
|
SRCSTYLES := $(shell find $(SRCDIR)/styles/* -name '*.scm')
|
|
|
|
SRCJS := $(shell find $(SRCDIR)/scripts/* -name '*.js')
|
|
|
|
SRCJS := $(shell find $(SRCDIR)/scripts/* -name '*.js')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BUILDTIME=$(shell date "+%s")
|
|
|
|
|
|
|
|
|
|
|
|
all: $(OUTDIR) $(STATICDIR) pages styles js |
|
|
|
all: $(OUTDIR) $(STATICDIR) pages styles js |
|
|
|
|
|
|
|
|
|
|
|
pages: $(SRCPAGES) |
|
|
|
pages: $(SRCPAGES) |
|
|
|
for page in $(SRCPAGES) ; do \
|
|
|
|
for page in $(SRCPAGES) ; do \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) $$page \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) -e "(define build-time $(BUILDTIME))" -s $$page \
|
|
|
|
| sed -f scripts/minify-html.sed \
|
|
|
|
| sed -f scripts/minify-html.sed \
|
|
|
|
> $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \
|
|
|
|
> $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \
|
|
|
|
; done
|
|
|
|
; done
|
|
|
|
|
|
|
|
|
|
|
|
styles: $(SRCSTYLES) |
|
|
|
styles: $(SRCSTYLES) |
|
|
|
for style in $(SRCSTYLES) ; do \
|
|
|
|
for style in $(SRCSTYLES) ; do \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) $$style \
|
|
|
|
$(SCHEME) $(SCHEMEFLAGS) -e "(define build-time $(BUILDTIME))" -s $$style \
|
|
|
|
> $$(echo $$style | sed 's/.*\/styles/dist/' | sed 's/scm/css/') \
|
|
|
|
> $$(echo $$style | sed 's/.*\/styles/dist/' | sed 's/scm/$(BUILDTIME).css/') \
|
|
|
|
; done
|
|
|
|
; done
|
|
|
|
|
|
|
|
|
|
|
|
js: $(SRCJS) |
|
|
|
js: $(SRCJS) |
|
|
|
for script in $(SRCJS) ; do \
|
|
|
|
for script in $(SRCJS) ; do \
|
|
|
|
cp $$script $$(echo $$script | sed 's/.*\/scripts/dist/') \
|
|
|
|
cp $$script $$(echo $$script | sed 's/.*\/scripts/dist/' | sed 's/js/$(BUILDTIME).js/') \
|
|
|
|
; done
|
|
|
|
; done
|
|
|
|
|
|
|
|
|
|
|
|
$(OUTDIR): |
|
|
|
$(OUTDIR): |
|
|
|