blob: 5b1afa9aa8a3ec5c457b3b79ca4b4f7d36d4750c [file] [log] [blame]
Reid Spencer52d7a752004-11-29 03:45:02 +00001##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
2#
3# The LLVM Compiler Infrastructure
4#
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.
7#
8##===----------------------------------------------------------------------===##
Brian Gaekee993d202004-05-14 19:50:33 +00009
Reid Spencer52d7a752004-11-29 03:45:02 +000010LEVEL := ../..
11
12include $(LEVEL)/Makefile.common
13
14POD := $(wildcard $(BUILD_SRC_DIR)/*.pod)
15
16EXTRA_DIST := $(POD) index.html
17
Reid Spencer3c54b6c2004-11-29 04:34:05 +000018HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.html, $(POD))
19MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.1, $(POD))
20PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.ps, $(POD))
Reid Spencer52d7a752004-11-29 03:45:02 +000021
Brian Gaekee993d202004-05-14 19:50:33 +000022.SUFFIXES:
23.SUFFIXES: .html .pod .1 .ps
24
Reid Spencer52d7a752004-11-29 03:45:02 +000025$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
26
Reid Spencer3c54b6c2004-11-29 04:34:05 +000027$(BUILD_OBJ_DIR)/%.html: %.pod
Reid Spencer52d7a752004-11-29 03:45:02 +000028 $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
29 --noindex --infile=$< --outfile=$@ --title=$*
Brian Gaekee993d202004-05-14 19:50:33 +000030
Reid Spencer3c54b6c2004-11-29 04:34:05 +000031$(BUILD_OBJ_DIR)/%.1: %.pod
Reid Spencer52d7a752004-11-29 03:45:02 +000032 $(POD2MAN) --release=$(PACKAGE_VERSION) \
33 --center="LLVM Command Guide" $< $@
Brian Gaekee993d202004-05-14 19:50:33 +000034
Reid Spencer5507eab2004-11-29 14:46:29 +000035$(BUILD_OBJ_DIR)/%.ps: $(BUILD_OBJ_DIR)/%.1
Reid Spencer52d7a752004-11-29 03:45:02 +000036 $(GROFF) -Tps -man $< > $@
Brian Gaekee993d202004-05-14 19:50:33 +000037
Reid Spencer52d7a752004-11-29 03:45:02 +000038clean-local::
39 $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
Brian Gaekee993d202004-05-14 19:50:33 +000040
Reid Spencer3c54b6c2004-11-29 04:34:05 +000041HTML_DIR := $(LLVM_DOCSDIR)/html/CommandGuide
42MAN_DIR := $(LLVM_MANDIR)/man1
43PS_DIR := $(LLVM_DOCSDIR)/ps
44
Reid Spencer52d7a752004-11-29 03:45:02 +000045install-local:: $(HTML) $(MAN) $(PS)
46 $(Echo) Installing HTML CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000047 $(Verb) $(INSTALL) -d $(HTML_DIR)
48 $(Verb) $(INSTALL) -C $(HTML) $(HTML_DIR)
49 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/index.html $(HTML_DIR)
50 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/manpage.css $(HTML_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000051 $(Echo) Installing MAN CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000052 $(Verb) $(INSTALL) -d $(MAN_DIR)
53 $(Verb) $(INSTALL) -C $(MAN) $(MAN_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000054 $(Echo) Installing PS CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000055 $(Verb) $(INSTALL) -d $(PS_DIR)
56 $(Verb) $(INSTALL) -C $(PS) $(PS_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000057
58uninstall-local::
59 $(Echo) Uninstalling Documentation
60 $(Verb) $(RM) -rf $(LLVM_DOCSDIR)
61
62printvars::
63 $(Echo) "POD : " '$(POD)'
64 $(Echo) "HTML : " '$(HTML)'