Browse Source

styles target fix

pull/1/head
Ivan Polyakov 3 years ago
parent
commit
3e55e264c7
  1. 16
      Makefile

16
Makefile

@ -19,15 +19,10 @@ include config.mk
DIRS := $(shell find $(SRCDIR)/pages/* -type d | sed 's/$(SRCDIR)\/pages/$(OUTDIR)/') DIRS := $(shell find $(SRCDIR)/pages/* -type d | sed 's/$(SRCDIR)\/pages/$(OUTDIR)/')
SRCPAGES := $(shell find $(SRCDIR)/pages/* -name '*.scm') SRCPAGES := $(shell find $(SRCDIR)/pages/* -name '*.scm')
SRCSTYLES := $(shell find $(SRCDIR)/styles/* -name '*.scm') SRCSTYLES := $(shell find $(SRCDIR)/styles/* -name '*.scm')
OUTSTYLES := $(shell find $(SRCDIR)/styles/ -type f -name '*.scm' | sed 's/$(SRCDIR)\/styles/$(OUTDIR)/')
OUTSTYLES := $(OUTSTYLES:%.scm=%.css)
SRCJS := $(shell find $(SRCDIR)/scripts/* -name '*.js') SRCJS := $(shell find $(SRCDIR)/scripts/* -name '*.js')
OUTJS := $(shell find $(SRCDIR)/scripts/ -type f -name '*.js' | sed 's/$(SRCDIR)\/scripts/$(OUTDIR)/')
all: $(OUTDIR) $(STATICDIR) pages $(OUTSTYLES) $(OUTJS) all: $(OUTDIR) $(STATICDIR) pages styles js
pages: $(SRCPAGES) pages: $(SRCPAGES)
for page in $(SRCPAGES) ; do \ for page in $(SRCPAGES) ; do \
@ -36,10 +31,13 @@ pages: $(SRCPAGES)
> $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \ > $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \
; done ; done
$(OUTSTYLES): $(SRCSTYLES) styles: $(SRCSTYLES)
$(SCHEME) $(SCHEMEFLAGS) $< > $@ for style in $(SRCSTYLES) ; do \
$(SCHEME) $(SCHEMEFLAGS) $$style \
> $$(echo $$style | sed 's/.*\/styles/dist/' | sed 's/scm/css/') \
; done
$(OUTJS): $(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/') \
; done ; done

Loading…
Cancel
Save