blob: cb1f3ece6474f9926a70b8efccdb8d8ce40367da [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
18HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, html/%.html, $(POD))
19MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, man/man1/%.1, $(POD))
20PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, ps/%.ps, $(POD))
21
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
Misha Brukman9ff1a932004-05-14 20:24:59 +000029html/%.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
Misha Brukman9ff1a932004-05-14 20:24:59 +000033man/man1/%.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
Misha Brukman9ff1a932004-05-14 20:24:59 +000037ps/%.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 Spencer52d7a752004-11-29 03:45:02 +000043install-local:: $(HTML) $(MAN) $(PS)
44 $(Echo) Installing HTML CommandGuide Documentation
45 $(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/html/CommandGuide
46 $(Verb) $(INSTALL) -C $(HTML) $(LLVM_DOCSDIR)/html/CommandGuide
47 $(Echo) Installing MAN CommandGuide Documentation
48 $(Verb) $(INSTALL) -d $(LLVM_MANDIR)/man1
49 $(Verb) $(INSTALL) -C $(MAN) $(LLVM_MANDIR)/man1
50 $(Echo) Installing PS CommandGuide Documentation
51 $(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/ps
52 $(Verb) $(INSTALL) -C $(PS) $(LLVM_DOCSDIR)/ps
53
54uninstall-local::
55 $(Echo) Uninstalling Documentation
56 $(Verb) $(RM) -rf $(LLVM_DOCSDIR)
57
58printvars::
59 $(Echo) "POD : " '$(POD)'
60 $(Echo) "HTML : " '$(HTML)'