public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
ae5e546f7d935ea4328dbbfd237ced3983a21325 blob 1288 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
PANDOC     := pandoc
INDEX      := index.md
BUILD_DIR  := build
SITE_DIR   := $(BUILD_DIR)/site
TARGET     := $(SITE_DIR)/index.html
DIST_FILE  := site.tar.gz
STYLE      := style.css
PAGES_DIR  := pages
MANPAGES   := $(BUILD_DIR)/man
PAGES      := $(wildcard $(PAGES_DIR)/*.md)
HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(SITE_DIR)/$(PAGES_DIR)/%.html, $(PAGES))

.PHONY: all
all:  $(BUILD_DIR) $(STYLE) $(TARGET) $(PAGES) manpages manual

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

.PHONY: dist
dist: $(DIST_FILE)

.PHONY: manpages
manpages: $(BUILD_DIR) $(MANPAGES)/olang.1

.PHONY: manual
manual: $(SITE_DIR)/manual/index.html


$(MANPAGES)/%.1: manpages/%.md
	$(PANDOC) -s -t man $< > $@

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

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

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

$(STYLE): $(BUILD_DIR)
	cp style.css $(SITE_DIR)

$(SITE_DIR)/manual/index.html: manual/*.texi
	make -C manual
	rm -rf $(SITE_DIR)/manual
	mv manual/html $(SITE_DIR)/manual

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

solving ae5e546 ...
found ae5e546 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