1 ##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 ifdef BUILD_FOR_WEBSITE
11 # This special case is for keeping the CommandGuide on the LLVM web site
12 # up to date automatically as the documents are checked in. It must build
13 # the POD files to HTML only and keep them in the src directories. It must also
14 # build in an unconfigured tree, hence the ifdef. To use this, run
15 # make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
17 POD := $(wildcard *.pod)
18 HTML := $(patsubst %.pod,html/%.html, $(POD))
23 pod2html --css=manpage.css --htmlroot=. --podpath=. \
24 --noindex --infile=$< --outfile=$@ --title=$*
30 include $(LEVEL)/Makefile.common
32 POD := $(wildcard $(BUILD_SRC_DIR)/*.pod)
34 EXTRA_DIST := $(POD) index.html
36 HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.html, $(POD))
37 MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.1, $(POD))
38 PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.ps, $(POD))
41 .SUFFIXES: .html .pod .1 .ps
43 $(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
45 $(BUILD_OBJ_DIR)/%.html: %.pod
46 $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
47 --noindex --infile=$< --outfile=$@ --title=$*
49 $(BUILD_OBJ_DIR)/%.1: %.pod
50 $(POD2MAN) --release=$(PACKAGE_VERSION) \
51 --center="LLVM Command Guide" $< $@
53 $(BUILD_OBJ_DIR)/%.ps: $(BUILD_OBJ_DIR)/%.1
54 $(GROFF) -Tps -man $< > $@
57 $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
59 HTML_DIR := $(LLVM_DOCSDIR)/html/CommandGuide
60 MAN_DIR := $(LLVM_MANDIR)/man1
61 PS_DIR := $(LLVM_DOCSDIR)/ps
63 install-local:: $(HTML) $(MAN) $(PS)
64 $(Echo) Installing HTML CommandGuide Documentation
65 $(Verb) $(INSTALL) -d $(HTML_DIR)
66 $(Verb) $(INSTALL) -C $(HTML) $(HTML_DIR)
67 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/index.html $(HTML_DIR)
68 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/manpage.css $(HTML_DIR)
69 $(Echo) Installing MAN CommandGuide Documentation
70 $(Verb) $(INSTALL) -d $(MAN_DIR)
71 $(Verb) $(INSTALL) -C $(MAN) $(MAN_DIR)
72 $(Echo) Installing PS CommandGuide Documentation
73 $(Verb) $(INSTALL) -d $(PS_DIR)
74 $(Verb) $(INSTALL) -C $(PS) $(PS_DIR)
77 $(Echo) Uninstalling Documentation
78 $(Verb) $(RM) -rf $(LLVM_DOCSDIR)
81 $(Echo) "POD : " '$(POD)'
82 $(Echo) "HTML : " '$(HTML)'