6 DOCDIRS := $(patsubst doc/%,$(R)$(docdir)/%,$(filter-out doc/source%,$(shell find doc -type d)))
7 DOCFILES := $(filter-out %~ %/all.mk %.gitignore doc/rfc/update.sh doc/source/%,$(shell find doc -type f))
8 DOCINSTALL := $(patsubst doc/%,$(R)$(docdir)/%,$(DOCFILES))
10 # Create the directories
12 @echo INSTALL $(patsubst $(R)$(docdir)/%,doc/%,$@)
13 @$(INSTALL) -d -m 755 $@
15 # Files depend on directories (order only).
16 # We don't care if the directories change.
17 $(DOCINSTALL): | $(DOCDIRS)
19 # Wildcard installation rule
20 $(R)$(docdir)/%: doc/%
22 @$(INSTALL) -m 644 $< $@
24 install.doc: $(DOCINSTALL)
28 @rm -f *~ rfc/*~ examples/*~
31 # Deal with these later
33 DOCRST := $(wildcard *.rst)
38 html: $(DOCRST:.rst=.html)