Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 1 | ##===- 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 Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 9 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 10 | LEVEL := ../.. |
| 11 | |
| 12 | include $(LEVEL)/Makefile.common |
| 13 | |
| 14 | POD := $(wildcard $(BUILD_SRC_DIR)/*.pod) |
| 15 | |
| 16 | EXTRA_DIST := $(POD) index.html |
| 17 | |
| 18 | HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, html/%.html, $(POD)) |
| 19 | MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, man/man1/%.1, $(POD)) |
| 20 | PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, ps/%.ps, $(POD)) |
| 21 | |
| 22 | all-local:: $(HTML) $(MAN) $(PS) |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 23 | |
| 24 | .SUFFIXES: |
| 25 | .SUFFIXES: .html .pod .1 .ps |
| 26 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 27 | $(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir |
| 28 | |
Misha Brukman | 9ff1a93 | 2004-05-14 20:24:59 +0000 | [diff] [blame] | 29 | html/%.html: %.pod |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 30 | $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \ |
| 31 | --noindex --infile=$< --outfile=$@ --title=$* |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 32 | |
Misha Brukman | 9ff1a93 | 2004-05-14 20:24:59 +0000 | [diff] [blame] | 33 | man/man1/%.1: %.pod |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 34 | $(POD2MAN) --release=$(PACKAGE_VERSION) \ |
| 35 | --center="LLVM Command Guide" $< $@ |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 36 | |
Misha Brukman | 9ff1a93 | 2004-05-14 20:24:59 +0000 | [diff] [blame] | 37 | ps/%.ps: man/man1/%.1 |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 38 | $(GROFF) -Tps -man $< > $@ |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 39 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 40 | clean-local:: |
| 41 | $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS) |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 42 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame^] | 43 | install-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 | |
| 54 | uninstall-local:: |
| 55 | $(Echo) Uninstalling Documentation |
| 56 | $(Verb) $(RM) -rf $(LLVM_DOCSDIR) |
| 57 | |
| 58 | printvars:: |
| 59 | $(Echo) "POD : " '$(POD)' |
| 60 | $(Echo) "HTML : " '$(HTML)' |