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
12 # This special case is for keeping the CommandGuide on the LLVM web site
13 # up to date automatically as the documents are checked in. It must build
14 # the POD files to HTML only and keep them in the src directories. It must also
15 # build in an unconfigured tree, hence the ifdef. To use this, run
16 # make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
18 POD := $(wildcard *.pod)
19 HTML := $(patsubst %.pod, html/%.html, $(POD))
20 MAN := $(patsubst %.pod, man/man1/%.1, $(POD))
21 PS := $(patsubst %.pod, ps/%.ps, $(POD))
23 all: $(HTML) $(MAN) $(PS)
26 .SUFFIXES: .html .pod .1 .ps
29 pod2html --css=manpage.css --htmlroot=. \
30 --podpath=. --noindex --infile=$< --outfile=$@ --title=$*
33 pod2man --release=CVS --center="LLVM Command Guide" $< $@
36 groff -Tps -man $< > $@
39 rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
45 include $(LEVEL)/Makefile.common
47 POD := $(wildcard $(PROJ_SRC_DIR)/*.pod)
49 EXTRA_DIST := $(POD) index.html
51 HTML = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.html, $(POD))
52 MAN = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.1, $(POD))
53 PS = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.ps, $(POD))
56 .SUFFIXES: .html .pod .1 .ps
58 $(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
62 $(PROJ_OBJ_DIR)/%.html: %.pod
63 $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
64 --noindex --infile=$< --outfile=$@ --title=$*
66 $(PROJ_OBJ_DIR)/%.1: %.pod
67 $(POD2MAN) --release=$(LLVMVersion) \
68 --center="LLVM Command Guide" $< $@
70 $(PROJ_OBJ_DIR)/%.ps: $(PROJ_OBJ_DIR)/%.1
71 $(GROFF) -Tps -man $< > $@
74 $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
76 HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
77 MAN_DIR := $(PROJ_mandir)/man1
78 PS_DIR := $(PROJ_docsdir)/ps
80 install-local:: $(HTML) $(MAN) $(PS)
81 $(Echo) Installing HTML CommandGuide Documentation
82 $(Verb) $(MKDIR) $(HTML_DIR)
83 $(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
84 $(Verb) $(DataInstall) $(PROJ_SRC_DIR)/index.html $(HTML_DIR)
85 $(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
86 $(Echo) Installing MAN CommandGuide Documentation
87 $(Verb) $(MKDIR) $(MAN_DIR)
88 $(Verb) $(DataInstall) $(MAN) $(MAN_DIR)
89 $(Echo) Installing PS CommandGuide Documentation
90 $(Verb) $(MKDIR) $(PS_DIR)
91 $(Verb) $(DataInstall) $(PS) $(PS_DIR)
94 $(Echo) Uninstalling Documentation
95 $(Verb) $(RM) -rf $(LLVM_DOCSDIR)
98 $(Echo) "POD : " '$(POD)'
99 $(Echo) "HTML : " '$(HTML)'