forked from FreeRADIUS/freeradius-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall.mk
40 lines (30 loc) · 909 Bytes
/
all.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
ifneq "$(docdir)" "no"
install: install.doc
clean: clean.doc
DOCDIRS := $(patsubst doc/%,$(R)$(docdir)/%,$(filter-out doc/source%,$(shell find doc -type d)))
DOCFILES := $(filter-out %~ %/all.mk %.gitignore doc/rfc/update.sh doc/source/%,$(shell find doc -type f))
DOCINSTALL := $(patsubst doc/%,$(R)$(docdir)/%,$(DOCFILES))
# Create the directories
$(DOCDIRS):
${Q}echo INSTALL $(patsubst $(R)$(docdir)/%,doc/%,$@)
${Q}$(INSTALL) -d -m 755 $@
# Files depend on directories (order only).
# We don't care if the directories change.
$(DOCINSTALL): | $(DOCDIRS)
# Wildcard installation rule
$(R)$(docdir)/%: doc/%
${Q}echo INSTALL $<
${Q}$(INSTALL) -m 644 $< $@
install.doc: $(DOCINSTALL)
.PHONY: clean.doc
clean.doc:
${Q}rm -f *~ rfc/*~ examples/*~
#
# Deal with these later
#
DOCRST := $(wildcard *.rst)
%.html: %.rst
${Q}rst2html.py $^ > $@
.PHONY: html
html: $(DOCRST:.rst=.html)
endif