From 3e55e264c706e28bb007cbeb1c1d5e494dd735a5 Mon Sep 17 00:00:00 2001 From: Ivan Polyakov Date: Sat, 30 Apr 2022 23:44:22 +0300 Subject: [PATCH] styles target fix --- Makefile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 32fe4a5..9dbd76e 100644 --- a/Makefile +++ b/Makefile @@ -19,15 +19,10 @@ include config.mk DIRS := $(shell find $(SRCDIR)/pages/* -type d | sed 's/$(SRCDIR)\/pages/$(OUTDIR)/') SRCPAGES := $(shell find $(SRCDIR)/pages/* -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') -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) for page in $(SRCPAGES) ; do \ @@ -36,10 +31,13 @@ pages: $(SRCPAGES) > $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \ ; done -$(OUTSTYLES): $(SRCSTYLES) - $(SCHEME) $(SCHEMEFLAGS) $< > $@ +styles: $(SRCSTYLES) + 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 \ cp $$script $$(echo $$script | sed 's/.*\/scripts/dist/') \ ; done