blob: 886b5a2f8422ebce65f42ea295ae3851d37aef36 (
plain) (
blame)
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
|
DIRS=$(wildcard *.d)
FILEEXT=ss # less or css
OUTEXT=.css
SRCTARGETS=$(patsubst %.d,dist/%.src$(OUTEXT),$(DIRS))
MINTARGETS=$(patsubst %.d,dist/%.min$(OUTEXT),$(DIRS))
depend=$(shell sh -c 'ls $$(echo $1 | cut -d/ -f2 | cut -d. -f1).d/*$(FILEEXT)')
.PHONY: all mkdist
all: $(MINTARGETS)
clean:
rm -f $(SRCTARGETS)
rm -f $(MINTARGETS)
mkdist:
@@mkdir -p dist
.SECONDEXPANSION:
$(SRCTARGETS): $$(call depend,$$@) | mkdist
date
cat $^ > $@
.SECONDEXPANSION:
$(MINTARGETS): $$(patsubst %.min$(OUTEXT),%.src$(OUTEXT),$$@)
date
lessc -x $^ > $@
|