| 6 |
# which are generated from a PO file (was a workaround for old po4a). |
# which are generated from a PO file (was a workaround for old po4a). |
| 7 |
|
|
| 8 |
manual := release-notes |
manual := release-notes |
|
release := sarge |
|
| 9 |
|
|
| 10 |
arches := $(shell grep '\[ <!ENTITY arch-title' release-notes.ent | awk '{print $$2}' | sed s/%//) |
arches := $(shell grep '\[ <!ENTITY arch-title' $(manual).ent \ |
| 11 |
|
| awk '{print $$2}' | sed s/%//) |
| 12 |
|
|
| 13 |
ifeq "$(OFFICIALWEBBUILD)" "true" |
ifeq "$(OFFICIALWEBBUILD)" "true" |
| 14 |
install_file := install -m 2664 -p |
install_file := install -m 2664 -p |
| 15 |
makedir := mkdir -p -m 2775 |
makedir := mkdir -p -m 2775 |
| 16 |
else |
else |
| 17 |
install_file := install -m 644 -p |
install_file := install -m 644 -p |
| 20 |
|
|
| 21 |
#LANGUAGES := en ca cs de es fi fr it ja pl pt_BR pt_PT ro ru sv zh_TW |
#LANGUAGES := en ca cs de es fi fr it ja pl pt_BR pt_PT ro ru sv zh_TW |
| 22 |
LANGUAGES := en de es |
LANGUAGES := en de es |
| 23 |
XMLROFF_LANGS=cs ja pl ro ru vi zh_CN en |
XMLROFF_LANGS=cs ja pl ro ru vi zh_CN |
| 24 |
|
|
| 25 |
LANGUAGES-publish := $(addsuffix -publish,$(LANGUAGES)) |
LANGUAGES-publish := $(addsuffix -publish,$(LANGUAGES)) |
| 26 |
LANGUAGES-clean := $(addsuffix -clean,$(LANGUAGES)) |
LANGUAGES-clean := $(addsuffix -clean,$(LANGUAGES)) |
| 56 |
-$(MAKE) -C $@ |
-$(MAKE) -C $@ |
| 57 |
|
|
| 58 |
publish: clean |
publish: clean |
|
ifneq "$(PUBLISHDIR)" "" |
|
|
# This branch is used for official website builds |
|
| 59 |
set -ex; \ |
set -ex; \ |
| 60 |
for arch in $(arches); do \ |
for arch in $(arches); do \ |
| 61 |
$(MAKE) architecture=$$arch; \ |
$(MAKE) architecture=$$arch; \ |
| 62 |
$(makedir) $(PUBLISHDIR)/$$arch/release-notes; \ |
$(makedir) $(PUBLISHDIR)/$$arch/$(manual); \ |
| 63 |
$(makedir) release-notes-$$arch; \ |
$(makedir) $(manual)-$$arch; \ |
| 64 |
for lang in $(LANGUAGES); do \ |
for lang in $(LANGUAGES); do \ |
| 65 |
$(makedir) release-notes-$$arch/$$lang; \ |
$(makedir) $(manual)-$$arch/$$lang; \ |
| 66 |
$(install_file) $$lang/release-notes.$$lang.html/* $(PUBLISHDIR)/$$arch/release-notes/; \ |
$(install_file) $$lang/$(manual).$$lang.$$arch.html/* \ |
| 67 |
$(install_file) $$lang/release-notes.$$lang.txt $(PUBLISHDIR)/$$arch/; \ |
$(PUBLISHDIR)/$$arch/$(manual)/; \ |
| 68 |
$(install_file) $$lang/release-notes.$$lang.pdf $(PUBLISHDIR)/$$arch/; \ |
$(install_file) $$lang/$(manual).$$arch.txt \ |
| 69 |
$(install_file) $$lang/release-notes.$$lang.ps $(PUBLISHDIR)/$$arch/; \ |
$(PUBLISHDIR)/$$arch/$(manual).$$lang.txt; \ |
| 70 |
$(install_file) $$lang/release-notes.$$lang.html/* release-notes-$$arch/$$lang; \ |
$(install_file) $$lang/$(manual).$$lang.$$arch.pdf \ |
| 71 |
$(install_file) $$lang/release-notes.$$lang.txt release-notes-$$arch/$$lang; \ |
$(PUBLISHDIR)/$$arch/$(manual).$$lang.pdf; \ |
| 72 |
$(install_file) $$lang/release-notes.$$lang.pdf release-notes-$$arch/$$lang; \ |
$(install_file) $$lang/$(manual).$$lang.$$arch.ps \ |
| 73 |
|
$(PUBLISHDIR)/$$arch/$(manual).$$lang.ps; \ |
| 74 |
|
$(install_file) $$lang/$(manual).$$lang.$$arch.html/* \ |
| 75 |
|
$(manual)-$$arch/$$lang/; \ |
| 76 |
|
$(install_file) $$lang/$(manual).$$arch.txt \ |
| 77 |
|
$(manual)-$$arch/$$lang/$(manual).$$lang.txt; \ |
| 78 |
|
$(install_file) $$lang/$(manual).$$lang.$$arch.pdf \ |
| 79 |
|
$(manual)-$$arch/$$lang/$(manual).$$lang.pdf ; \ |
| 80 |
|
$(install_file) $$lang/$(manual).$$lang.$$arch.ps \ |
| 81 |
|
$(manual)-$$arch/$$lang/$(manual).$$lang.ps ; \ |
| 82 |
done; \ |
done; \ |
| 83 |
for i in $(PUBLISHDIR)/$$arch/release-notes/*.en.html; do \ |
for i in $(PUBLISHDIR)/$$arch/$(manual)/*.en.html; do \ |
| 84 |
ln -sf `basename $$i` $${i%.en.html}.html; \ |
ln -sf `basename $$i` $${i%.en.html}.html; \ |
|
done; \ |
|
|
if [ -n "$(PUBLISHTARBALL)" ]; then (cd release-notes-$$arch && tar czf $(PUBLISHDIR)/release-notes-$$arch.tar.gz *); fi \ |
|
|
done |
|
|
else |
|
|
# This branch is probably no longer used (FJP 20060406) |
|
|
set -e; \ |
|
|
for arch in $(arches); do \ |
|
|
$(MAKE) architecture=$$arch; \ |
|
|
$(makedir) upgrade-$$arch; \ |
|
|
for lang in $(LANGUAGES); do \ |
|
|
$(install_file) $$lang/release-notes.$$lang.html/* upgrade-$$arch; \ |
|
|
$(install_file) $$lang/release-notes.$$lang.txt upgrade-$$arch; \ |
|
|
$(install_file) $$lang/release-notes.$$lang.pdf upgrade-$$arch; \ |
|
| 85 |
done; \ |
done; \ |
| 86 |
ln -sf index.en.html upgrade-$$arch/index.html; \ |
if [ -n "$(PUBLISHTARBALL)" ]; then (cd $(manual)-$$arch \ |
| 87 |
ln -sf release-notes.en.txt upgrade-$$arch/Release-Notes; \ |
&& tar czf $(PUBLISHDIR)/$(manual)-$$arch.tar.gz *); fi \ |
| 88 |
done |
done |
|
tar cjf relnotes.tar.bz2 upgrade-* |
|
|
rm -rf upgrade-* |
|
|
endif |
|
| 89 |
|
|
| 90 |
ifdef LINGUA |
ifdef LINGUA |
| 91 |
html: $(LINGUA)/$(manual).$(LINGUA).html/index.html |
html: $(LINGUA)/$(manual).$(architecture).html/index.html |
| 92 |
$(LINGUA)/$(manual).$(LINGUA).html/index.html: \ |
$(LINGUA)/$(manual).$(architecture).html/index.html: \ |
| 93 |
$(LINGUA)/$(manual).$(architecture).xml html.xsl |
$(LINGUA)/$(manual).$(architecture).xml html.xsl |
| 94 |
mkdir -p $(LINGUA)/$(manual).$(LINGUA).html |
mkdir -p $(LINGUA)/$(manual).$(architecture).html |
| 95 |
cd $(LINGUA) && $(XP) -o $(manual).$(LINGUA).html/ \ |
cd $(LINGUA) && $(XP) -o $(manual).$(architecture).html/ \ |
| 96 |
$(DBK2HTML) $(manual).$(architecture).xml |
$(DBK2HTML) --stringparam html.ext $(LINGUA).html \ |
| 97 |
|
$(manual).$(architecture).xml |
| 98 |
pdf: $(LINGUA)/release-notes.pdf |
|
| 99 |
$(LINGUA)/release-notes.pdf: $(LINGUA)/$(manual).$(architecture).xml fo.xsl |
pdf: $(LINGUA)/$(manual).$(architecture).pdf |
| 100 |
|
$(LINGUA)/$(manual).$(architecture).pdf: \ |
| 101 |
|
$(LINGUA)/$(manual).$(architecture).xml fo.xsl |
| 102 |
USE_XR=`echo " $(XMLROFF_LANGS) " | grep " $(LINGUA) "`; \ |
USE_XR=`echo " $(XMLROFF_LANGS) " | grep " $(LINGUA) "`; \ |
| 103 |
if [ -n "$$USE_XR" ]; then \ |
if [ -n "$$USE_XR" ]; then \ |
| 104 |
$(XMLROFF) -o $@ $< fo.xsl; \ |
$(XMLROFF) -o $@ $< fo.xsl; \ |
| 106 |
$(DBLATEX) --output=$@ $<; \ |
$(DBLATEX) --output=$@ $<; \ |
| 107 |
fi |
fi |
| 108 |
|
|
| 109 |
txt: $(LINGUA)/release-notes.txt |
# Can't we just drop PS in favour of PDF? |
| 110 |
$(LINGUA)/release-notes.txt: $(LINGUA)/$(manual).$(architecture).xml txt.xsl |
ps: $(LINGUA)/$(manual).$(architecture).ps |
| 111 |
|
$(LINGUA)/$(manual).$(architecture).ps: \ |
| 112 |
|
$(LINGUA)/$(manual).$(architecture).xml fo.xsl |
| 113 |
|
USE_XR=`echo " $(XMLROFF_LANGS) " | grep " $(LINGUA) "`; \ |
| 114 |
|
if [ -n "$$USE_XR" ]; then \ |
| 115 |
|
$(XMLROFF) --format postscript -o $@ $< fo.xsl; \ |
| 116 |
|
else \ |
| 117 |
|
$(DBLATEX) --output=$@ --ps $<; \ |
| 118 |
|
fi |
| 119 |
|
|
| 120 |
|
txt: $(LINGUA)/$(manual).$(architecture).txt |
| 121 |
|
$(LINGUA)/$(manual).$(architecture).txt: \ |
| 122 |
|
$(LINGUA)/$(manual).$(architecture).xml txt.xsl |
| 123 |
$(XP) $(DBK2HTML1) $< \ |
$(XP) $(DBK2HTML1) $< \ |
| 124 |
| w3m -cols 70 -dump -no-graph -T text/html > $@ |
| w3m -cols 70 -dump -no-graph -T text/html > $@ |
| 125 |
|
|
| 138 |
|
|
| 139 |
FORCE: |
FORCE: |
| 140 |
else |
else |
| 141 |
$(LINGUA)/%.dbk: en/%.dbk |
ifneq "$(LINGUA)" "en" |
| 142 |
|
$(LINGUA)/%.dbk: en/%.dbk $(LINGUA)/%.po |
| 143 |
$(TRANSLATE) --master $< --po $(@:.dbk=.po) --localized $@ |
$(TRANSLATE) --master $< --po $(@:.dbk=.po) --localized $@ |
| 144 |
endif |
endif |
| 145 |
|
endif |
| 146 |
|
|
| 147 |
ifdef LINGUA |
ifdef LINGUA |
| 148 |
.PHONY: updatepo |
.PHONY: updatepo |
| 149 |
updatepo: $(patsubst en/%.dbk,$(LINGUA)/%.po,$(wildcard en/*.dbk)) |
updatepo: $(patsubst en/%.dbk,$(LINGUA)/%.po,$(wildcard en/*.dbk)) |
| 150 |
$(LINGUA)/%.po: en/%.dbk |
$(LINGUA)/%.po: en/%.dbk |
| 151 |
echo $(UPDATEPO) --master $< --po $@ |
$(UPDATEPO) --master $< --po $@ |
| 152 |
|
|
| 153 |
|
validate: $(patsubst en/%,$(LINGUA)/%,$(SOURCES)) |
| 154 |
|
$(XL) $(LINGUA)/$(manual).dbk |
| 155 |
endif |
endif |
| 156 |
|
|
| 157 |
tidypo: |
tidypo: |
| 172 |
exit 1 |
exit 1 |
| 173 |
endif |
endif |
| 174 |
: > $@ # clear the file |
: > $@ # clear the file |
| 175 |
echo "<!ENTITY architecture \"$(architecture)\">" >> $@ |
echo "<!ENTITY architecture \"$(architecture)\">" >> $@ |
| 176 |
echo "<!ENTITY % $(architecture) \"INCLUDE\">" >> $@ |
echo "<!ENTITY % $(architecture) \"INCLUDE\">" >> $@ |
| 177 |
|
|
| 178 |
.PHONY: dynamic.ent |
.PHONY: dynamic.ent |
| 179 |
dynamic.ent: dynamic_$(architecture).ent |
dynamic.ent: dynamic_$(architecture).ent |
| 180 |
ln -sf $< $@ |
ln -sf $< $@ |
| 181 |
|
|
| 182 |
clean:: |
clean:: |
| 183 |
rm -f dynamic*.ent relnotes.tar.bz2 |
rm -f dynamic*.ent relnotes.tar.bz2 |
| 184 |
find -maxdepth 1 -name 'release-notes-*' -type d -exec rm -fr {} \; |
find -maxdepth 1 -name '$(manual)-*' -type d -exec rm -fr {} \; |
| 185 |
clean:: $(LANGUAGES-clean) |
clean:: $(LANGUAGES-clean) |
| 186 |
|
|
| 187 |
$(LANGUAGES-clean): |
$(LANGUAGES-clean): |