diff --git a/Makefile b/Makefile index a7fd8b7..629c556 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,32 @@ DISTDIR ?= $(shell pwd) TEMPLATE_DIR ?= $(DISTDIR)/templates SCRIPT_DIR ?= $(DISTDIR)/scripts BUILDDIR ?= $(DISTDIR)/build +DESTDIR ?= /var/www/wikipages export -PAGES := $(wildcard pages/*) +PAGE_TARGETS := $(patsubst pages/%,$(BUILDDIR)/page/%,$(wildcard pages/*)) -all: $(PAGES) static +all: $(PAGE_TARGETS) $(BUILDDIR)/index.html static -$(PAGES): - $(MAKE) -C $@ +$(BUILDDIR)/page/%: + @$(MAKE) -C pages/$* -static: +$(BUILDDIR)/static: @mkdir -p $(BUILDDIR) cp -r static $(BUILDDIR) -.PHONY: all $(PAGES) static +$(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 diff --git a/index.html b/index.html new file mode 100644 index 0000000..9374c7b --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + +
+ + + + Статьи: +