diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-03-26 00:13:38 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-26 00:17:18 -0400 |
| commit | b792aba25494fe29b64ed0689da3025fc7946879 (patch) | |
| tree | dc9c29977ab68d0e81d122ef155957e8a18b0a02 /Documentation | |
| parent | b6575cbf73b04fc7d7f44742ee9d33058557142d (diff) | |
build: Added installing of documentation
Added 'make install_doc'
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/Makefile | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index 4644dc5..d5785bf 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
| @@ -6,11 +6,13 @@ ifeq ($(VERBOSE),1) | |||
| 6 | Q = | 6 | Q = |
| 7 | print_asciidoc = | 7 | print_asciidoc = |
| 8 | print_xsltproc = | 8 | print_xsltproc = |
| 9 | print_install = | ||
| 9 | hide_xsltproc_output = | 10 | hide_xsltproc_output = |
| 10 | else | 11 | else |
| 11 | Q = @ | 12 | Q = @ |
| 12 | print_asciidoc = echo ' ASCIIDOC '`basename $@`; | 13 | print_asciidoc = echo ' ASCIIDOC '`basename $@`; |
| 13 | print_xsltproc = echo ' XSLTPROC '`basename $@`; | 14 | print_xsltproc = echo ' XSLTPROC '`basename $@`; |
| 15 | print_install = echo ' INSTALL '`basename $1`' to '$2; | ||
| 14 | hide_xsltproc_output = 2> /dev/null | 16 | hide_xsltproc_output = 2> /dev/null |
| 15 | endif | 17 | endif |
| 16 | 18 | ||
| @@ -49,11 +51,29 @@ $(obj)/%.1: $(obj)/%.xsl | |||
| 49 | 51 | ||
| 50 | TEXT = $(wildcard *.txt) | 52 | TEXT = $(wildcard *.txt) |
| 51 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) | 53 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) |
| 52 | MAN = $(patsubst %.txt,$(obj)/%.1, ${TEXT}) | 54 | MAN1 = $(patsubst %.txt,$(obj)/%.1, ${TEXT}) |
| 53 | 55 | ||
| 54 | all: ${MAN} | 56 | all: $(MAN1) |
| 55 | 57 | ||
| 56 | 58 | ||
| 59 | define do_install | ||
| 60 | $(print_install) \ | ||
| 61 | if [ ! -d $2 ]; then \ | ||
| 62 | $(INSTALL) -d -m 755 $2 ; \ | ||
| 63 | fi; \ | ||
| 64 | $(INSTALL) $1 $2; | ||
| 65 | endef | ||
| 66 | |||
| 67 | MAN1_INSTALL = $(subst .1,.install,$(MAN1)) | ||
| 68 | |||
| 69 | $(MAN1_INSTALL): %.install : %.1 force | ||
| 70 | $(Q)$(call do_install, $<, '$(man_dir_SQ)/man1') | ||
| 71 | |||
| 72 | install: $(MAN1_INSTALL) | ||
| 73 | |||
| 57 | clean: | 74 | clean: |
| 58 | (cd $(obj); \ | 75 | (cd $(obj); \ |
| 59 | $(RM) *.xml *.xsl *.1) | 76 | $(RM) *.xml *.xsl *.1) |
| 77 | |||
| 78 | .PHONE: force | ||
| 79 | force: \ No newline at end of file | ||
