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)
|
||||
|
||||
SCRIPTS := $(wildcard script/*.js)
|
||||
|
||||
SCRIPTS != find script -name '*.js'
|
||||
STYLES != find style -name '*.css'
|
||||
STYLESVGS != find style -name '*.svg'
|
||||
STYLEPNGS != find style -name '*.png'
|
||||
|
||||
FONTS := $(shell find fonts \
|
||||
FONTS != find fonts \
|
||||
-iname '*.eot' -or -iname '*.svg' -or \
|
||||
-iname '*.ttf' -or -iname '*.woff' -or \
|
||||
-iname '*.woff2' -or -iname '*.css')
|
||||
-iname '*.woff2' -or -iname '*.css'
|
||||
|
||||
STATIC := $(SCRIPTS) $(STYLES) $(STYLEPNGS) $(STYLESVGS) $(FONTS)
|
||||
BSTATIC := $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
||||
STATIC = $(SCRIPTS) $(STYLES) $(STYLEPNGS) $(STYLESVGS) $(FONTS)
|
||||
BSTATIC = $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
||||
|
||||
.PHONY: all build
|
||||
all: build
|
||||
|
@ -41,7 +40,7 @@ $(BUILDDIR)/%: %
|
|||
$(call copy)
|
||||
|
||||
$(BUILDDIR)/%: $(TMPDIR)/%
|
||||
$(call copy)
|
||||
$(call copy,-l)
|
||||
|
||||
|
||||
$(TMPDIR)/%_small.png: $(DATADIR)/%.png
|
||||
|
@ -96,11 +95,11 @@ upload: build
|
|||
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
|
||||
|
||||
|
||||
# no args
|
||||
# one arg for extra flags
|
||||
define copy
|
||||
echo "[copy] "$@
|
||||
mkdir -p "$(dir $@)"
|
||||
cp -Ll "$^" "$@"
|
||||
cp $(1) -L "$^" "$@"
|
||||
endef
|
||||
|
||||
# args:
|
||||
|
|
|
@ -100,7 +100,7 @@ makeRules prefix filters build data_ tmp = [b|@0
|
|||
$$(call depend-single,$@prefix,$@build,$@data_,$flags)
|
||||
|
||||
$@buildPrefix/%: $@tmp/%
|
||||
$$(call copy)
|
||||
$$(call copy,-l)
|
||||
|
||||
$@buildPrefix/%: $@data_/%
|
||||
$$(call copy)
|
||||
|
|
Loading…
Reference in a new issue