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
|
*.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
|
MAKEPAGES = cabal -v0 run -- make-pages
|
||||||
|
|
||||||
|
YAMLS != find $(DATADIR) -iname "*.yaml"
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
ifneq ($(BUILDDIR),$(DATADIR))
|
ifneq ($(BUILDDIR),$(DATADIR))
|
||||||
$(BUILDDIR)/%: $(DATADIR)/%
|
$(BUILDDIR)/%: $(DATADIR)/%
|
||||||
cp $< $@
|
@echo "[copy] "$@
|
||||||
|
@cp $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BUILDDIR)/%_small.png: $(DATADIR)/%.png
|
$(BUILDDIR)/%_small.png: $(DATADIR)/%.png
|
||||||
mkdir -p $(dir $@)
|
@echo "[resize] "$@
|
||||||
convert -resize "$(SMALL)x$(SMALL)^" -gravity center -crop 1:1+0 $< $@
|
@mkdir -p $(dir $@)
|
||||||
|
@convert -resize "$(SMALL)x$(SMALL)^" -gravity center -crop 1:1+0 $< $@
|
||||||
|
|
||||||
$(BUILDDIR)/%_med.png: $(DATADIR)/%.png
|
$(BUILDDIR)/%_med.png: $(DATADIR)/%.png
|
||||||
mkdir -p $(dir $@)
|
@echo "[resize] "$@
|
||||||
convert -resize "$(MED)x$(MED)>" $< $@
|
@mkdir -p $(dir $@)
|
||||||
|
@convert -resize "$(MED)x$(MED)>" $< $@
|
||||||
|
|
||||||
$(BUILDDIR)/%/index.html: $(DATADIR)/%/info.yaml
|
$(BUILDDIR)/%/index.html: $(DATADIR)/%/info.yaml
|
||||||
mkdir -p $(dir $@)
|
@echo "[single] "$@
|
||||||
$(MAKEPAGES) single $< -o $@
|
@mkdir -p $(dir $@)
|
||||||
|
@$(MAKEPAGES) single $< -o $@
|
||||||
|
|
||||||
$(BUILDDIR)/nsfw/%/index.html: $(DATADIR)/%/info.yaml
|
$(BUILDDIR)/nsfw/%/index.html: $(DATADIR)/%/info.yaml
|
||||||
mkdir -p $(dir $@)
|
@echo "[single] "$@
|
||||||
$(MAKEPAGES) single $< -o $@ -n
|
@mkdir -p $(dir $@)
|
||||||
|
@$(MAKEPAGES) single $< -o $@ -n
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean distclean
|
||||||
clean:
|
clean:
|
||||||
$(RM) -r $(BUILDDIR)
|
rm -rf $(BUILDDIR) $(TMPDIR)
|
||||||
|
distclean: clean
|
||||||
|
rm -rf dist-newstyle
|
||||||
|
|
Loading…
Reference in a new issue