1 ##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # 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.
21 # If we are in BUILD_FOR_WEBSITE mode, default to the all target.
25 rm -f pod2htm
*.
*~~
$(HTML
) $(MAN
) $(PS
)
27 # To create other directories, as needed, and timestamp their creation
34 # Otherwise, if not in BUILD_FOR_WEBSITE mode, use the project info.
36 include $(LEVEL
)/Makefile.common
38 SRC_DOC_DIR
=$(PROJ_SRC_DIR
)/
39 DST_HTML_DIR
=$(PROJ_OBJ_DIR
)/
40 DST_MAN_DIR
=$(PROJ_OBJ_DIR
)/
41 DST_PS_DIR
=$(PROJ_OBJ_DIR
)/
46 POD
:= $(wildcard $(SRC_DOC_DIR
)*.pod
)
47 HTML
:= $(patsubst $(SRC_DOC_DIR
)%.pod
, $(DST_HTML_DIR
)%.html
, $(POD
))
48 MAN
:= $(patsubst $(SRC_DOC_DIR
)%.pod
, $(DST_MAN_DIR
)%.1, $(POD
))
49 PS
:= $(patsubst $(SRC_DOC_DIR
)%.pod
, $(DST_PS_DIR
)%.ps
, $(POD
))
52 .SUFFIXES
: .html .pod
.1 .ps
54 $(DST_HTML_DIR
)%.html
: %.pod
$(DST_HTML_DIR
)/.
dir
55 pod2html
--css
=manpage.css
--htmlroot
=. \
56 --podpath
=.
--noindex
--infile
=$< --outfile
=$@
--title
=$*
58 $(DST_MAN_DIR
)%.1: %.pod
$(DST_MAN_DIR
)/.
dir
59 pod2man
--release
=CVS
--center
="LLVM Command Guide" $< $@
61 $(DST_PS_DIR
)%.ps
: $(DST_MAN_DIR
)%.1 $(DST_PS_DIR
)/.
dir
62 groff
-Tps
-man
$< > $@
69 EXTRA_DIST
:= $(POD
) index.html
72 $(Verb
) $(RM
) -f pod2htm
*.
*~~
$(HTML
) $(MAN
) $(PS
)
74 HTML_DIR
:= $(PROJ_docsdir
)/html
/CommandGuide
75 MAN_DIR
:= $(PROJ_mandir
)/man1
76 PS_DIR
:= $(PROJ_docsdir
)/ps
78 install-local
:: $(HTML
) $(MAN
) $(PS
)
79 $(Echo
) Installing HTML CommandGuide Documentation
80 $(Verb
) $(MKDIR
) $(HTML_DIR
)
81 $(Verb
) $(DataInstall
) $(HTML
) $(HTML_DIR
)
82 $(Verb
) $(DataInstall
) $(PROJ_SRC_DIR
)/index.html
$(HTML_DIR
)
83 $(Verb
) $(DataInstall
) $(PROJ_SRC_DIR
)/manpage.css
$(HTML_DIR
)
84 $(Echo
) Installing MAN CommandGuide Documentation
85 $(Verb
) $(MKDIR
) $(MAN_DIR
)
86 $(Verb
) $(DataInstall
) $(MAN
) $(MAN_DIR
)
87 $(Echo
) Installing PS CommandGuide Documentation
88 $(Verb
) $(MKDIR
) $(PS_DIR
)
89 $(Verb
) $(DataInstall
) $(PS
) $(PS_DIR
)
92 $(Echo
) Uninstalling CommandGuide Documentation
93 $(Verb
) $(RM
) -rf
$(HTML_DIR
) $(MAN_DIR
) $(PS_DIR
)
96 $(Echo
) "POD : " '$(POD)'
97 $(Echo
) "HTML : " '$(HTML)'