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 | |
| 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 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 29 | $(BUILD_OBJ_DIR)/%.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 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 33 | $(BUILD_OBJ_DIR)/%.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 | |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 37 | $(BUILD_OBJ_DIR)/%.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 | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 43 | HTML_DIR := $(LLVM_DOCSDIR)/html/CommandGuide |
| 44 | MAN_DIR := $(LLVM_MANDIR)/man1 |
| 45 | PS_DIR := $(LLVM_DOCSDIR)/ps |
| 46 | |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 47 | install-local:: $(HTML) $(MAN) $(PS) |
| 48 | $(Echo) Installing HTML CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 49 | $(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 Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 53 | $(Echo) Installing MAN CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 54 | $(Verb) $(INSTALL) -d $(MAN_DIR) |
| 55 | $(Verb) $(INSTALL) -C $(MAN) $(MAN_DIR) |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 56 | $(Echo) Installing PS CommandGuide Documentation |
Reid Spencer | 3c54b6c | 2004-11-29 04:34:05 +0000 | [diff] [blame^] | 57 | $(Verb) $(INSTALL) -d $(PS_DIR) |
| 58 | $(Verb) $(INSTALL) -C $(PS) $(PS_DIR) |
Reid Spencer | 52d7a75 | 2004-11-29 03:45:02 +0000 | [diff] [blame] | 59 | |
| 60 | uninstall-local:: |
| 61 | $(Echo) Uninstalling Documentation |
| 62 | $(Verb) $(RM) -rf $(LLVM_DOCSDIR) |
| 63 | |
| 64 | printvars:: |
| 65 | $(Echo) "POD : " '$(POD)' |
| 66 | $(Echo) "HTML : " '$(HTML)' |