makefile tidying
This commit is contained in:
parent
070e2110c0
commit
d8f37d5d80
2 changed files with 28 additions and 11 deletions
6
.gitattributes
vendored
6
.gitattributes
vendored
|
@ -1 +1,7 @@
|
|||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
[attr]makefile whitespace=-tab-in-indent,trailing-space
|
||||
makefile makefile
|
||||
Makefile makefile
|
||||
*.mk makefile
|
||||
*.d makefile
|
||||
|
|
33
Makefile
33
Makefile
|
@ -8,27 +8,38 @@ MED := 1200
|
|||
|
||||
MAKEPAGES = cabal -v0 run -- make-pages
|
||||
|
||||
YAMLS != find $(DATADIR) -iname "*.yaml"
|
||||
|
||||
all:
|
||||
|
||||
ifneq ($(BUILDDIR),$(DATADIR))
|
||||
$(BUILDDIR)/%: $(DATADIR)/%
|
||||
cp $< $@
|
||||
@echo "[copy] "$@
|
||||
@cp $< $@
|
||||
endif
|
||||
|
||||
$(BUILDDIR)/%_small.png: $(DATADIR)/%.png
|
||||
mkdir -p $(dir $@)
|
||||
convert -resize "$(SMALL)x$(SMALL)^" -gravity center -crop 1:1+0 $< $@
|
||||
@echo "[resize] "$@
|
||||
@mkdir -p $(dir $@)
|
||||
@convert -resize "$(SMALL)x$(SMALL)^" -gravity center -crop 1:1+0 $< $@
|
||||
|
||||
$(BUILDDIR)/%_med.png: $(DATADIR)/%.png
|
||||
mkdir -p $(dir $@)
|
||||
convert -resize "$(MED)x$(MED)>" $< $@
|
||||
@echo "[resize] "$@
|
||||
@mkdir -p $(dir $@)
|
||||
@convert -resize "$(MED)x$(MED)>" $< $@
|
||||
|
||||
$(BUILDDIR)/%/index.html: $(DATADIR)/%/info.yaml
|
||||
mkdir -p $(dir $@)
|
||||
$(MAKEPAGES) single $< -o $@
|
||||
@echo "[single] "$@
|
||||
@mkdir -p $(dir $@)
|
||||
@$(MAKEPAGES) single $< -o $@
|
||||
|
||||
$(BUILDDIR)/nsfw/%/index.html: $(DATADIR)/%/info.yaml
|
||||
mkdir -p $(dir $@)
|
||||
$(MAKEPAGES) single $< -o $@ -n
|
||||
@echo "[single] "$@
|
||||
@mkdir -p $(dir $@)
|
||||
@$(MAKEPAGES) single $< -o $@ -n
|
||||
|
||||
.PHONY: clean
|
||||
.PHONY: clean distclean
|
||||
clean:
|
||||
$(RM) -r $(BUILDDIR)
|
||||
rm -rf $(BUILDDIR) $(TMPDIR)
|
||||
distclean: clean
|
||||
rm -rf dist-newstyle
|
||||
|
|
Loading…
Reference in a new issue