| 39 |
# This can and will be overridden by a higher level makefile |
# This can and will be overridden by a higher level makefile |
| 40 |
PUBLISHDIR := ~/public_html/manuals.html |
PUBLISHDIR := ~/public_html/manuals.html |
| 41 |
|
|
| 42 |
# List of languages built for "distclean" target for DDP: |
# List of languages not being handled with po4a: |
| 43 |
LANGSALL := en de fr es it ru ja zh-cn |
LANGSNOPO := en de es it pt-br ru ja zh-cn |
| 44 |
|
# List of languages handled with po4a: |
| 45 |
|
LANGSPO := fr |
| 46 |
# List of languages built for "publish" target for DDP |
# List of languages built for "publish" target for DDP |
| 47 |
LANGS := en de fr pt-br |
LANGS := en de fr pt-br |
|
# This are all the languages, not all are compiled for DDP |
|
|
# due to them being out of dte |
|
|
#LANGS := en de fr es it ru ja zh-cn pt-br |
|
| 48 |
|
|
| 49 |
# Files which affect SGML generation (excluding *.sgml) |
# Files which affect SGML generation (excluding *.sgml) |
| 50 |
SGMLENTS := custom.ent default.ent |
SGMLENTS := custom.ent default.ent |
| 54 |
$(foreach lang, $(LANGS), $(wildcard $(lang)/*.sgml ) ) \ |
$(foreach lang, $(LANGS), $(wildcard $(lang)/*.sgml ) ) \ |
| 55 |
$(SGMLENTS) |
$(SGMLENTS) |
| 56 |
|
|
| 57 |
|
# All SGML targets not being handled with po4a: |
| 58 |
|
SGMLNOPOSRCS := $(foreach lang, $(LANGSNOPO), $(MANUAL).$(lang).sgml) |
| 59 |
|
|
| 60 |
|
# All SGML targets handled with po4a: |
| 61 |
|
SGMLPOSRCS := $(foreach lang, $(LANGSPO), $(MANUAL).$(lang).sgml) |
| 62 |
|
|
| 63 |
# =================================================================== # |
# =================================================================== # |
| 64 |
# Build target default part: Routine # |
# Build target default part: Routine # |
| 65 |
# =================================================================== # |
# =================================================================== # |
| 69 |
$(MANUAL).%.html.stamp $(MANUAL).%.txt $(MANUAL).%.ps $(MANUAL).%.pdf: \ |
$(MANUAL).%.html.stamp $(MANUAL).%.txt $(MANUAL).%.ps $(MANUAL).%.pdf: \ |
| 70 |
locale=$(subst pt-br,pt_BR,\ |
locale=$(subst pt-br,pt_BR,\ |
| 71 |
$(subst zh-cn,zh_CN,\ |
$(subst zh-cn,zh_CN,\ |
| 72 |
$*)) |
$(subst fr,fr.UTF-8,\ |
| 73 |
|
$*))) |
| 74 |
|
|
| 75 |
### Full guide |
### Full guide |
| 76 |
|
|
| 120 |
# Create starting SGML for each language from the template. Actual |
# Create starting SGML for each language from the template. Actual |
| 121 |
# contents reside in language-segregated subdirectories. |
# contents reside in language-segregated subdirectories. |
| 122 |
|
|
| 123 |
$(MANUAL).%.sgml: $(MANUAL0).sgml |
$(SGMLNOPOSRCS): $(MANUAL).%.sgml: $(MANUAL0).sgml |
| 124 |
sed -e "s/@@LANGS@@/$*/g" \ |
sed -e "s/@@LANGS@@/$*/g" \ |
| 125 |
-e "s/@@DIRS@@/$*/g" \ |
-e "s/@@DIRS@@/$*/g" \ |
| 126 |
-e "s/@@NAME@@/$(MANUAL)/g" \ |
-e "s/@@NAME@@/$(MANUAL)/g" \ |
| 127 |
$< > $(MANUAL).$*.sgml |
$< > $(MANUAL).$*.sgml |
| 128 |
|
|
| 129 |
|
# Create starting SGML for each language handled with po4a |
| 130 |
|
|
| 131 |
|
$(SGMLPOSRCS): $(MANUAL).%.sgml: $(MANUAL).en.sgml $(MANUAL).en.ent po4a/po/%.po |
| 132 |
|
po4a po4a/po4a.cfg |
| 133 |
|
|
| 134 |
# HTML |
# HTML |
| 135 |
$(MANUAL).%.html.stamp: $(MANUAL).%.sgml $(MANUAL).%.ent $(SGMLSRCS) |
$(MANUAL).%.html.stamp: $(MANUAL).%.sgml $(MANUAL).%.ent $(SGMLSRCS) |
| 136 |
debiandoc2html -l $(locale) -c $< |
debiandoc2html -l $(locale) -C $< |
| 137 |
# since $(MANUAL).%.html/index.%.html cannot be a target file |
# since $(MANUAL).%.html/index.%.html cannot be a target file |
| 138 |
@for file in `ls $(MANUAL).$*.html/*` ; do \ |
@for file in `ls $(MANUAL).$*.html/*` ; do \ |
| 139 |
newfile=`echo $$file|\ |
newfile=`echo $$file|\ |