| 41 |
PROFILE=$(DOCBOOK_XSL)/profiling/profile.xsl |
PROFILE=$(DOCBOOK_XSL)/profiling/profile.xsl |
| 42 |
XMLROFF=xmlroff --backend cairo |
XMLROFF=xmlroff --backend cairo |
| 43 |
|
|
| 44 |
|
ifeq "$(DRAFT)" "1" |
| 45 |
|
draftmode := yes |
| 46 |
|
else |
| 47 |
|
draftmode := maybe |
| 48 |
|
endif |
| 49 |
|
|
| 50 |
# po4a stuff |
# po4a stuff |
| 51 |
UPDATEPO=po4a-updatepo --format docbook |
UPDATEPO=po4a-updatepo --format docbook |
| 52 |
PO_FILES=$(wildcard de/*.po es/*.po) |
PO_FILES=$(wildcard de/*.po es/*.po) |
| 100 |
mkdir -p $(LINGUA)/$(manual).$(architecture).html |
mkdir -p $(LINGUA)/$(manual).$(architecture).html |
| 101 |
cd $(LINGUA) && $(XP) -o $(manual).$(architecture).html/ \ |
cd $(LINGUA) && $(XP) -o $(manual).$(architecture).html/ \ |
| 102 |
$(DBK2HTML) --stringparam html.ext $(LINGUA).html \ |
$(DBK2HTML) --stringparam html.ext $(LINGUA).html \ |
| 103 |
|
--stringparam draft.mode $(draftmode) \ |
| 104 |
$(manual).$(architecture).xml |
$(manual).$(architecture).xml |
| 105 |
|
|
| 106 |
pdf: $(LINGUA)/$(manual).$(architecture).pdf |
pdf: $(LINGUA)/$(manual).$(architecture).pdf |
| 107 |
|
ifneq "$(filter $(XMLROFF_LANGS),$(LINGUA))" "" |
| 108 |
$(LINGUA)/$(manual).$(architecture).pdf: \ |
$(LINGUA)/$(manual).$(architecture).pdf: \ |
| 109 |
|
$(LINGUA)/$(manual).$(architecture).fo |
| 110 |
|
$(LINGUA)/$(manual).$(architecture).ps: \ |
| 111 |
|
$(LINGUA)/$(manual).$(architecture).fo |
| 112 |
|
$(LINGUA)/$(manual).$(architecture).fo: \ |
| 113 |
$(LINGUA)/$(manual).$(architecture).xml fo.xsl |
$(LINGUA)/$(manual).$(architecture).xml fo.xsl |
| 114 |
USE_XR=`echo " $(XMLROFF_LANGS) " | grep " $(LINGUA) "`; \ |
else |
| 115 |
if [ -n "$$USE_XR" ]; then \ |
$(LINGUA)/$(manual).$(architecture).pdf: \ |
| 116 |
$(XMLROFF) -o $@ $< fo.xsl; \ |
$(LINGUA)/$(manual).$(architecture).xml |
| 117 |
else \ |
$(LINGUA)/$(manual).$(architecture).ps: \ |
| 118 |
$(DBLATEX) --output=$@ $<; \ |
$(LINGUA)/$(manual).$(architecture).xml |
| 119 |
fi |
endif |
| 120 |
|
|
| 121 |
|
%.fo: %.xml |
| 122 |
|
$(XP) -o $@ --stringparam draft.mode $(draftmode) fo.xsl $< |
| 123 |
|
|
| 124 |
|
%.pdf: %.fo |
| 125 |
|
$(XMLROFF) -o $@ $< |
| 126 |
|
|
| 127 |
|
%.pdf: %.xml |
| 128 |
|
$(DBLATEX) --output=$@ $< |
| 129 |
|
|
| 130 |
# Can't we just drop PS in favour of PDF? |
# Can't we just drop PS in favour of PDF? |
| 131 |
ps: $(LINGUA)/$(manual).$(architecture).ps |
%.ps: %.fo |
| 132 |
$(LINGUA)/$(manual).$(architecture).ps: \ |
$(XMLROFF) --format postscript -o $@ $< |
| 133 |
$(LINGUA)/$(manual).$(architecture).xml fo.xsl |
|
| 134 |
USE_XR=`echo " $(XMLROFF_LANGS) " | grep " $(LINGUA) "`; \ |
%.ps: %.xml |
| 135 |
if [ -n "$$USE_XR" ]; then \ |
$(DBLATEX) --output=$@ --ps $< |
|
$(XMLROFF) --format postscript -o $@ $< fo.xsl; \ |
|
|
else \ |
|
|
$(DBLATEX) --output=$@ --ps $<; \ |
|
|
fi |
|
| 136 |
|
|
| 137 |
txt: $(LINGUA)/$(manual).$(architecture).txt |
txt: $(LINGUA)/$(manual).$(architecture).txt |
| 138 |
$(LINGUA)/$(manual).$(architecture).txt: \ |
$(LINGUA)/$(manual).$(architecture).txt: \ |
| 139 |
$(LINGUA)/$(manual).$(architecture).xml txt.xsl |
$(LINGUA)/$(manual).$(architecture).xml txt.xsl |
| 140 |
$(XP) $(DBK2HTML1) $< \ |
$(XP) --stringparam draft.mode $(draftmode) $(DBK2HTML1) $< \ |
| 141 |
| w3m -cols 70 -dump -no-graph -T text/html > $@ |
| w3m -cols 70 -dump -no-graph -T text/html > $@ |
| 142 |
|
|
| 143 |
# profiling for architecture, needed by all output formats |
# profiling for architecture, needed by all output formats |
| 144 |
|
condition := ; |
| 145 |
|
ifeq "$(DRAFT)" "1" |
| 146 |
|
condition := fixme |
| 147 |
|
endif |
| 148 |
space := $(undef) $(undef) |
space := $(undef) $(undef) |
| 149 |
semic := $(undef);$(undef) |
semic := $(undef);$(undef) |
| 150 |
otherarchs := $(subst $(space),$(semic), \ |
otherarchs := $(subst $(space),$(semic), \ |
| 151 |
$(addprefix not-,$(filter-out $(architecture),$(arches)))) |
$(addprefix not-,$(filter-out $(architecture),$(arches)))) |
| 152 |
ifneq "$(filter $(architecture),i386 amd64 powerpc)" "" |
ifneq "$(filter $(architecture),i386 amd64 powerpc)" "" |
| 153 |
condition := "$(condition);g-i" |
condition := $(condition);g-i |
| 154 |
endif |
endif |
| 155 |
|
|
| 156 |
ifneq "$(filter $(architecture),mips mipsel)" "" |
ifneq "$(filter $(architecture),mips mipsel)" "" |
| 157 |
initrd := "$(condition);no-initrd" |
initrd := $(condition);no-initrd |
| 158 |
else |
else |
| 159 |
initrd := "$(condition);uses-initrd" |
initrd := $(condition);uses-initrd |
| 160 |
endif |
endif |
| 161 |
|
|
| 162 |
$(LINGUA)/$(manual).$(architecture).xml: \ |
$(LINGUA)/$(manual).$(architecture).xml: \ |
| 163 |
$(patsubst en/%,$(LINGUA)/%,$(SOURCES)) |
$(patsubst en/%,$(LINGUA)/%,$(SOURCES)) |
| 164 |
$(XP) --stringparam profile.arch "$(architecture)$(otherarchs)" \ |
$(XP) --stringparam profile.arch "$(architecture)$(otherarchs)" \ |
| 165 |
--stringparam profile.condition $(condition) \ |
--stringparam profile.condition "$(condition)" \ |
| 166 |
$(PROFILE) $(@D)/$(manual).dbk > $@ |
$(PROFILE) $(@D)/$(manual).dbk > $@ |
| 167 |
endif |
endif |
| 168 |
|
|