public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
ecb51a2c59b435aa4c0fde055c604e6958d24191 blob 769 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
PANDOC     := pandoc
INDEX      := index.md
BUILD_DIR  := build
TARGET     := $(BUILD_DIR)/index.html
DIST_FILE  := site.tar.gz
PAGES_DIR  := pages
PAGES      := $(wildcard $(PAGES_DIR)/*.md)
HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(BUILD_DIR)/$(PAGES_DIR)/%.html, $(PAGES))

.PHONY: all
all:  $(BUILD_DIR) $(TARGET) $(PAGES)

.PHONY: clean
clean:
	rm -rf $(BUILD_DIR)
	rm -f $(DIST_FILE)

.PHONY: dist
dist: $(DIST_FILE)

$(DIST_FILE): all
	tar -czf $(DIST_FILE) -C $(BUILD_DIR) .

$(TARGET): $(HTML_PAGES)
	$(PANDOC) -s --template template.html -f markdown -t html $(INDEX) > $(TARGET)

$(BUILD_DIR):
	@mkdir -p $@
	@mkdir -p $@/$(PAGES_DIR)

$(BUILD_DIR)/$(PAGES_DIR)/%.html: $(PAGES_DIR)/%.md
	$(PANDOC) -s --template template.html -f markdown -t html $< > $@
debug log:

solving ecb51a2 ...
found ecb51a2 in https://git.johnnyrichard.com/olang.git

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox