pandoc-pages/Makefile

34 lines
633 B
Makefile
Raw Permalink Normal View History

2023-06-04 18:24:07 +03:00
DISTDIR ?= $(shell pwd)
TEMPLATE_DIR ?= $(DISTDIR)/templates
SCRIPT_DIR ?= $(DISTDIR)/scripts
BUILDDIR ?= $(DISTDIR)/build
2023-06-09 19:26:09 +03:00
DESTDIR ?= /var/www/wikipages
2023-05-20 17:38:37 +03:00
export
2023-06-09 19:26:09 +03:00
PAGE_TARGETS := $(patsubst pages/%,$(BUILDDIR)/page/%,$(wildcard pages/*))
2023-05-20 17:38:37 +03:00
2023-06-09 19:28:25 +03:00
all: $(PAGE_TARGETS) $(BUILDDIR)/index.html $(BUILDDIR)/static
2023-05-20 17:38:37 +03:00
2023-06-09 19:26:09 +03:00
$(BUILDDIR)/page/%:
@$(MAKE) -C pages/$*
2023-05-20 17:38:37 +03:00
2023-06-09 19:26:09 +03:00
$(BUILDDIR)/static:
2023-06-04 18:24:07 +03:00
@mkdir -p $(BUILDDIR)
cp -r static $(BUILDDIR)
2023-06-09 19:26:09 +03:00
$(BUILDDIR)/index.html:
cp index.html $(BUILDDIR)
clean:
rm -rfI $(BUILDDIR)/
install:
@mkdir -p $(DESTDIR)
cp -r -T $(BUILDDIR)/ $(DESTDIR)/
uninstall:
rm -rfI $(DESTDIR)/
.PHONY: all clean install uninstall