-
Notifications
You must be signed in to change notification settings - Fork 4
/
Pages.mk
93 lines (64 loc) · 2.08 KB
/
Pages.mk
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This is a Pages.mk file as part of the
# mkaestatic static website generator.
#
# This make configuration file must be copied
# to every subdirectory of the project.
#
# The marked sections SUBDIRECTORIES and
# LOCAL PAGES can be modified as needed.
#
# Author: Michael Borinsky
# Github: https://github.com/michibo/mkaestatic
# License: MIT
# Copyright 2016-2022
# Standard non-recursive make setup
sp := $(sp).x
dirstack_$(sp) := $(d)
d := $(dir)
#########################################
# LOCAL PAGES
#########################################
# Add the pages for the current directory here:
# (pages are just .md files)
# By default all .md files are included:
PAGES_SRC_$(d):=$(wildcard $(d)*.md)
# You can also restrict to specific ones:
#PAGES_SRC_$(d):=$(d)readme.md $(d)index.md
# Include the $(d) for reference to the local directory.
# This is the non-recursive-make trick.
# See for instance: http://evbergen.home.xs4all.nl/nonrecursive-make.html
#########################################
# SUBDIRECTORIES
#########################################
# Add subdirectories here in random order:
# Load config and pages from blog/
#########################################
# Uncomment the following section for the subdirectories example
#########################################
#dir := $(d)blog/
#
#include $(dir)Pages.mk
#MKCONFIGS+=$(dir)Pages.mk
#########################################
# Load more subdirectories ...
#dir := $(d)blog2/
#include $(dir)Pages.mk
#MKCONFIGS+=$(dir)Pages.mk
#...
#########################################
#########################################
### Recursive make stuff, do not change!
# Set make variables to manage the pages
PAGES_$(d):=$(basename $(PAGES_SRC_$(d)))
PAGES+=$(PAGES_$(d))
TGTS_$(d):=$(addsuffix .html,$(PAGES_$(d)))
TGTS+=$(TGTS_$(d))
CONFIGS_$(d):=$(addsuffix .yml,$(PAGES_$(d)))
CONFIGS+=$(CONFIGS_$(d))
DEPS_$(d):=$(addsuffix .d,$(PAGES_$(d)))
DEPS+=$(DEPS_$(d))
CLEAN+=$(TGTS_$(d)) $(CONFIGS_$(d)) $(DEPS_$(d))
-include $(DEPS_$(d))
# Standard non-recursive make things
d := $(dirstack_$(sp))
sp := $(basename $(sp))