blob: 0896c711acee6f16f4b67dec91147c065730694c [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
22all-local:: $(HTML) $(MAN) $(PS)
Brian Gaekee993d202004-05-14 19:50:33 +000023
24.SUFFIXES:
25.SUFFIXES: .html .pod .1 .ps
26
Reid Spencer52d7a752004-11-29 03:45:02 +000027$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
28
Reid Spencer3c54b6c2004-11-29 04:34:05 +000029$(BUILD_OBJ_DIR)/%.html: %.pod
Reid Spencer52d7a752004-11-29 03:45:02 +000030 $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
31 --noindex --infile=$< --outfile=$@ --title=$*
Brian Gaekee993d202004-05-14 19:50:33 +000032
Reid Spencer3c54b6c2004-11-29 04:34:05 +000033$(BUILD_OBJ_DIR)/%.1: %.pod
Reid Spencer52d7a752004-11-29 03:45:02 +000034 $(POD2MAN) --release=$(PACKAGE_VERSION) \
35 --center="LLVM Command Guide" $< $@
Brian Gaekee993d202004-05-14 19:50:33 +000036
Reid Spencer3c54b6c2004-11-29 04:34:05 +000037$(BUILD_OBJ_DIR)/%.ps: man/man1/%.1
Reid Spencer52d7a752004-11-29 03:45:02 +000038 $(GROFF) -Tps -man $< > $@
Brian Gaekee993d202004-05-14 19:50:33 +000039
Reid Spencer52d7a752004-11-29 03:45:02 +000040clean-local::
41 $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
Brian Gaekee993d202004-05-14 19:50:33 +000042
Reid Spencer3c54b6c2004-11-29 04:34:05 +000043HTML_DIR := $(LLVM_DOCSDIR)/html/CommandGuide
44MAN_DIR := $(LLVM_MANDIR)/man1
45PS_DIR := $(LLVM_DOCSDIR)/ps
46
Reid Spencer52d7a752004-11-29 03:45:02 +000047install-local:: $(HTML) $(MAN) $(PS)
48 $(Echo) Installing HTML CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000049 $(Verb) $(INSTALL) -d $(HTML_DIR)
50 $(Verb) $(INSTALL) -C $(HTML) $(HTML_DIR)
51 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/index.html $(HTML_DIR)
52 $(Verb) $(INSTALL) -C $(BUILD_SRC_DIR)/manpage.css $(HTML_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000053 $(Echo) Installing MAN CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000054 $(Verb) $(INSTALL) -d $(MAN_DIR)
55 $(Verb) $(INSTALL) -C $(MAN) $(MAN_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000056 $(Echo) Installing PS CommandGuide Documentation
Reid Spencer3c54b6c2004-11-29 04:34:05 +000057 $(Verb) $(INSTALL) -d $(PS_DIR)
58 $(Verb) $(INSTALL) -C $(PS) $(PS_DIR)
Reid Spencer52d7a752004-11-29 03:45:02 +000059
60uninstall-local::
61 $(Echo) Uninstalling Documentation
62 $(Verb) $(RM) -rf $(LLVM_DOCSDIR)
63
64printvars::
65 $(Echo) "POD : " '$(POD)'
66 $(Echo) "HTML : " '$(HTML)'