1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
# Global rules shared by all makefiles -*-Makefile-*-
#
# Each individual makefile should define the following variables:
# DOCLOCALE : the language for the documentation
# ALLBOOKS : the books to build
# WINExxx_SRCS : the SGML source files for each supported book
SHELL = /bin/sh
LN = @LN@
LN_S = @LN_S@
RM = rm -f
MV = mv
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DB2TXT = @DB2TXT@
PO4ADIR = $(TOPSRCDIR)/po4a
PO4AENV = PERLLIB=$(PO4ADIR)/lib
all: Makefile $(SUBDIRS)
doc: html pdf ps txt
html: $(ALLBOOKS:%=%.html) $(SUBDIRS:%=%/__html__)
pdf: $(ALLBOOKS:%=%.pdf) $(SUBDIRS:%=%/__pdf__)
ps: $(ALLBOOKS:%=%.ps) $(SUBDIRS:%=%/__ps__)
txt: $(ALLBOOKS:%=%.txt) $(SUBDIRS:%=%/__txt__)
.PHONY: doc html pdf ps txt dist
# Rules for generating the documentation from the SGML sources
.SUFFIXES: .sgml .html .pdf .ps .txt
.sgml.html:
$(DB2HTML) -u $<
.sgml.pdf:
$(DB2PDF) $<
.sgml.ps:
$(DB2PS) $<
.sgml.txt:
$(DB2TXT) $<
clean:: $(SUBDIRS:%=%/__clean__)
$(RM) *.aux *.dvi *.out *.tex *.log wine-doc-*.tar.gz
$(RM) $(ALLBOOKS:%=%.ps) $(ALLBOOKS:%=%.pdf) $(ALLBOOKS:%=%.html) $(ALLBOOKS:%=%.txt)
$(RM) -r *.junk DBTOHTML_OUTPUT_DIR*
# Rules for distribution tarballs of formatted docs
dist: wine-doc-$(DOCLOCALE)-ps.tar.gz wine-doc-$(DOCLOCALE)-pdf.tar.gz wine-doc-$(DOCLOCALE)-html.tar.gz wine-doc-$(DOCLOCALE)-txt.tar.gz
wine-doc-$(DOCLOCALE)-ps.tar.gz: $(ALLBOOKS:%=%.ps)
tar cf - $(ALLBOOKS:%=%.ps) | gzip -9 > $@ || ($(RM) $@ && false)
wine-doc-$(DOCLOCALE)-pdf.tar.gz: $(ALLBOOKS:%=%.pdf)
tar cf - $(ALLBOOKS:%=%.pdf) | gzip -9 > $@ || ($(RM) $@ && false)
wine-doc-$(DOCLOCALE)-html.tar.gz: $(ALLBOOKS:%=%.html)
tar cf - $(ALLBOOKS:%=%.html) | gzip -9 > $@ || ($(RM) $@ && false)
wine-doc-$(DOCLOCALE)-txt.tar.gz: $(ALLBOOKS:%=%.txt)
tar cf - $(ALLBOOKS:%=%.txt) | gzip -9 > $@ || ($(RM) $@ && false)
# Directory recursion
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
.PHONY: $(SUBDIRS:%=%/__clean__)
$(SUBDIRS:%=%/__html__): dummy
@cd `dirname $@` && $(MAKE) html
.PHONY: $(SUBDIRS:%=%/__html__)
$(SUBDIRS:%=%/__pdf__): dummy
@cd `dirname $@` && $(MAKE) pdf
.PHONY: $(SUBDIRS:%=%/__pdf__)
$(SUBDIRS:%=%/__ps__): dummy
@cd `dirname $@` && $(MAKE) ps
.PHONY: $(SUBDIRS:%=%/__ps__)
$(SUBDIRS:%=%/__txt__): dummy
@cd `dirname $@` && $(MAKE) txt
.PHONY: $(SUBDIRS:%=%/__txt__)
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
dummy:
.PHONY: dummy $(SUBDIRS)
# Manual Dependencies
ALLFORMATS = html pdf sgml ps txt
$(ALLFORMATS:%=wineusr-guide.%): $(WINEUSR_SRCS)
$(ALLFORMATS:%=winedev-guide.%): $(WINEDEV_SRCS)
$(ALLFORMATS:%=winelib-guide.%): $(WINELIB_SRCS)
$(ALLFORMATS:%=wine-faq.%): $(WINEFAQ_SRCS)
Makefile: Makefile.in $(TOPSRCDIR)/configure
@echo $? is newer than '$@', please rerun $(TOPSRCDIR)/configure!
@exit 1
### End of global rules
|