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 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 18 | HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.html, $(POD)) |
| 19 | MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.1, $(POD)) |
| 20 | PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.ps, $(POD)) |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 21 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 22 | .SUFFIXES: |
| 23 | .SUFFIXES: .html .pod .1 .ps |
| 24 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 25 | $(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir |
| 26 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 27 | $(BUILD_OBJ_DIR)/%.html: %.pod |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 28 | $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \ |
| 29 | --noindex --infile=$< --outfile=$@ --title=$* |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 30 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 31 | $(BUILD_OBJ_DIR)/%.1: %.pod |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 32 | $(POD2MAN) --release=$(PACKAGE_VERSION) \ |
| 33 | --center="LLVM Command Guide" $< $@ |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 34 | |
Reid Spencer | 5507eab | 2004-11-29 14:46:29 +0000 | [diff] [blame^] | 35 | $(BUILD_OBJ_DIR)/%.ps: $(BUILD_OBJ_DIR)/%.1 |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 36 | $(GROFF) -Tps -man $< > $@ |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 37 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 38 | clean-local:: |
| 39 | $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS) |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 40 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 41 | HTML_DIR := $(LLVM_DOCSDIR)/html/CommandGuide |
| 42 | MAN_DIR := $(LLVM_MANDIR)/man1 |
| 43 | PS_DIR := $(LLVM_DOCSDIR)/ps |
| 44 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 45 | install-local:: $(HTML) $(MAN) $(PS) |
| 46 | $(Echo) Installing HTML CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 47 | $(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 Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 51 | $(Echo) Installing MAN CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 52 | $(Verb) $(INSTALL) -d $(MAN_DIR) |
| 53 | $(Verb) $(INSTALL) -C $(MAN) $(MAN_DIR) |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 54 | $(Echo) Installing PS CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame] | 55 | $(Verb) $(INSTALL) -d $(PS_DIR) |
| 56 | $(Verb) $(INSTALL) -C $(PS) $(PS_DIR) |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 57 | |
| 58 | uninstall-local:: |
| 59 | $(Echo) Uninstalling Documentation |
| 60 | $(Verb) $(RM) -rf $(LLVM_DOCSDIR) |
| 61 | |
| 62 | printvars:: |
| 63 | $(Echo) "POD : " '$(POD)' |
| 64 | $(Echo) "HTML : " '$(HTML)' |