diff --git a/Makefile b/Makefile index 4083316..04b05bb 100644 --- a/Makefile +++ b/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: diff --git a/make-pages/Depend.hs b/make-pages/Depend.hs index f1a31f3..ceb9339 100644 --- a/make-pages/Depend.hs +++ b/make-pages/Depend.hs @@ -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)