| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 # Makefile for DocBoook compilation 2 # 3 # $Id: Makefile,v 1.5 2004/10/01 12:54:37 giallu Exp $ 4 # 5 # 6 # Some things to remember: 7 # - The main DocBook name is $BOOK.sgml 8 # - All other files should have .sgml extension 9 # - Images should go into ./images directory 10 # - Images should be in png format 11 # 12 13 # Output directory 14 BUILD_DIR:=build 15 16 # Installation directory 17 INSTALL_DIR:=install 18 19 # Book name: will be used to build the input filename ($BOOK.sgml) 20 # and the output filename ($BOOK.html, $BOOK.pdf and so on) 21 BOOK:=template 22 23 # Stylesheet name. Original file from: 24 # /usr/share/sgml/docbook/utils-0.6.11/docbook-utils.dsl 25 # 26 STYLE=../../template/stylesheet.dsl 27 CSS=../../template/stylesheet.css 28 29 FILES:=$(BOOK).sgml $(wildcard *.sgml) $(STYLE) $(BUILD_DIR) builddate 30 31 IMAGES:=$(wildcard images/*.png) 32 EPSS:=$(IMAGES:.png=.eps) 33 34 default: help 35 36 all: html pdf 37 #all: html html_onefile text pdf ps sgml.gz html.tar.gz 38 39 html: $(BUILD_DIR)/$(BOOK)/$(BOOK).html 40 41 html_onefile: $(BUILD_DIR)/$(BOOK).html 42 43 pdf: $(BUILD_DIR)/$(BOOK).pdf 44 45 ps: $(BUILD_DIR)/$(BOOK).ps 46 47 rtf: $(BUILD_DIR)/$(BOOK).rtf 48 49 text: $(BUILD_DIR)/$(BOOK).txt 50 51 $(BUILD_DIR): 52 mkdir -p $@ 53 54 builddate: 55 echo -n $$(LANG="en_US";date "+%e %B %Y") > $@ 56 57 html.tar.gz: html 58 (for i in $(files); do \ 59 tar -cf $$i.tar $$i; \ 60 gzip -f $$i.tar; \ 61 done; ) 62 63 $(BUILD_DIR)/$(BOOK)/$(BOOK).html: $(FILES) $(IMAGES) 64 jw -d $(STYLE)#html -f docbook -b html -o $(BUILD_DIR)/$(BOOK) $< 65 mkdir -p $(BUILD_DIR)/$(BOOK)/images 66 -cp images/* $(BUILD_DIR)/$(BOOK)/images/ 67 -cp $(CSS) $(BUILD_DIR)/$(BOOK)/ 68 69 $(BUILD_DIR)/$(BOOK).pdf: $(FILES) $(IMAGES) 70 jw -d $(STYLE)#print -f docbook -b pdf -o $(BUILD_DIR) $< 71 72 $(BUILD_DIR)/$(BOOK).html: $(FILES) $(IMAGES) 73 jw -d $(STYLE)#html -f docbook -b html -o $(BUILD_DIR) -u $< 74 75 $(BUILD_DIR)/$(BOOK).ps: $(FILES) $(EPSS) 76 jw -d $(STYLE) -f docbook -b ps -o $(BUILD_DIR) $< 77 78 $(BUILD_DIR)/$(BOOK).rtf: $(FILES) $(IMAGES) 79 jw -d $(STYLE) -f docbook -b rtf -o $(BUILD_DIR) $< 80 81 $(BUILD_DIR)/$(BOOK).txt: $(FILES) 82 jw -f docbook -b txt -o $(BUILD_DIR) $< 83 84 # pattern rules to convert PNGs to EPS 85 # 86 %.eps : %.png 87 pngtopnm $< | pnmtops -noturn > $@ 88 89 90 .PHONY: valid install clean dist help 91 valid: 92 nsgmls -s $(BOOK).sgml 93 94 install: 95 -mkdir -p $(INSTALL_DIR) 96 -cp -r $(BUILD_DIR)/$(BOOK) $(BUILD_DIR)/$(BOOK).pdf $(BUILD_DIR)/$(BOOK).html $(BUILD_DIR)/$(BOOK).ps $(BUILD_DIR)/$(BOOK).rtf $(BUILD_DIR)/$(BOOK).txt $(INSTALL_DIR) 97 98 clean: 99 -$(RM) *.log *.dvi *.aux *.tex *.out 100 -$(RM) $(GENERATED_IMG) builddate 101 -$(RM) -r $(BUILD_DIR)/$(BOOK) 102 -$(RM) $(BUILD_DIR)/$(BOOK).html $(BUILD_DIR)/$(BOOK).ps $(BUILD_DIR)/$(BOOK).pdf $(BUILD_DIR)/$(BOOK).rtf $(BUILD_DIR)/$(BOOK).txt 103 104 # Rebuild everything 105 dist: clean all 106 107 help: 108 @echo "Usage: make <target>" 109 @echo "Available targets are:" 110 @echo " help Show this text" 111 @echo " html Convert to HTML (split pages)" 112 @echo " html_onefile Convert to HTML (single page)" 113 @echo " pdf Convert to PDF" 114 @echo " rtf Convert to RTF" 115 @echo " ps Convert to Postscript" 116 @echo " text Convert to plain text" 117 @echo " clean Remove output and temporary files" 118 @echo " valid Check book correctness with nsgmls"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Sep 2 13:07:01 2010 | Cross-referenced by PHPXref 0.7 |