fix copying behaviour
This commit is contained in:
parent
8a39a5a46b
commit
2a0ca6177e
2 changed files with 9 additions and 10 deletions
17
Makefile
17
Makefile
|
@ -13,19 +13,18 @@ MAKEPAGES := $(TMPDIR)/make-pages
|
||||||
|
|
||||||
YAMLS != find $(DATADIR) -name $(INFONAME)
|
YAMLS != find $(DATADIR) -name $(INFONAME)
|
||||||
|
|
||||||
SCRIPTS := $(wildcard script/*.js)
|
SCRIPTS != find script -name '*.js'
|
||||||
|
|
||||||
STYLES != find style -name '*.css'
|
STYLES != find style -name '*.css'
|
||||||
STYLESVGS != find style -name '*.svg'
|
STYLESVGS != find style -name '*.svg'
|
||||||
STYLEPNGS != find style -name '*.png'
|
STYLEPNGS != find style -name '*.png'
|
||||||
|
|
||||||
FONTS := $(shell find fonts \
|
FONTS != find fonts \
|
||||||
-iname '*.eot' -or -iname '*.svg' -or \
|
-iname '*.eot' -or -iname '*.svg' -or \
|
||||||
-iname '*.ttf' -or -iname '*.woff' -or \
|
-iname '*.ttf' -or -iname '*.woff' -or \
|
||||||
-iname '*.woff2' -or -iname '*.css')
|
-iname '*.woff2' -or -iname '*.css'
|
||||||
|
|
||||||
STATIC := $(SCRIPTS) $(STYLES) $(STYLEPNGS) $(STYLESVGS) $(FONTS)
|
STATIC = $(SCRIPTS) $(STYLES) $(STYLEPNGS) $(STYLESVGS) $(FONTS)
|
||||||
BSTATIC := $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
BSTATIC = $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
||||||
|
|
||||||
.PHONY: all build
|
.PHONY: all build
|
||||||
all: build
|
all: build
|
||||||
|
@ -41,7 +40,7 @@ $(BUILDDIR)/%: %
|
||||||
$(call copy)
|
$(call copy)
|
||||||
|
|
||||||
$(BUILDDIR)/%: $(TMPDIR)/%
|
$(BUILDDIR)/%: $(TMPDIR)/%
|
||||||
$(call copy)
|
$(call copy,-l)
|
||||||
|
|
||||||
|
|
||||||
$(TMPDIR)/%_small.png: $(DATADIR)/%.png
|
$(TMPDIR)/%_small.png: $(DATADIR)/%.png
|
||||||
|
@ -96,11 +95,11 @@ upload: build
|
||||||
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
|
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
|
||||||
|
|
||||||
|
|
||||||
# no args
|
# one arg for extra flags
|
||||||
define copy
|
define copy
|
||||||
echo "[copy] "$@
|
echo "[copy] "$@
|
||||||
mkdir -p "$(dir $@)"
|
mkdir -p "$(dir $@)"
|
||||||
cp -Ll "$^" "$@"
|
cp $(1) -L "$^" "$@"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# args:
|
# args:
|
||||||
|
|
|
@ -100,7 +100,7 @@ makeRules prefix filters build data_ tmp = [b|@0
|
||||||
$$(call depend-single,$@prefix,$@build,$@data_,$flags)
|
$$(call depend-single,$@prefix,$@build,$@data_,$flags)
|
||||||
|
|
||||||
$@buildPrefix/%: $@tmp/%
|
$@buildPrefix/%: $@tmp/%
|
||||||
$$(call copy)
|
$$(call copy,-l)
|
||||||
|
|
||||||
$@buildPrefix/%: $@data_/%
|
$@buildPrefix/%: $@data_/%
|
||||||
$$(call copy)
|
$$(call copy)
|
||||||
|
|
Loading…
Reference in a new issue