| 1 |
#
|
| 2 |
# Makefile for the release notes, top-level
|
| 3 |
#
|
| 4 |
|
| 5 |
# AMD64 port is included in the source, but should not be built by default
|
| 6 |
# as the port is not yet officially supported
|
| 7 |
# It can still be built by explicitly specifying 'architecture=amd64'
|
| 8 |
arches := $(shell grep '\[ <!entity arch-title' release-notes.ent | awk '{print $$2}' | sed s/%// | grep -v 'amd64')
|
| 9 |
|
| 10 |
ifeq "$(OFFICIALWEBBUILD)" "true"
|
| 11 |
install_file := install -m 2664 -p
|
| 12 |
makedir := mkdir -p -m 2775
|
| 13 |
else
|
| 14 |
install_file := install -m 644 -p
|
| 15 |
makedir := mkdir -p -m 0755
|
| 16 |
endif
|
| 17 |
|
| 18 |
# The following languages are currently disabled
|
| 19 |
# ca: not updated for Sarge
|
| 20 |
# fi, sk: old Sarge translations missing essential information
|
| 21 |
LANGUAGES := en cs da de es fr it ja ko nl pt_BR ro ru zh_CN zh_TW
|
| 22 |
|
| 23 |
LANGUAGES-publish := $(addsuffix -publish,$(LANGUAGES))
|
| 24 |
LANGUAGES-clean := $(addsuffix -clean,$(LANGUAGES))
|
| 25 |
|
| 26 |
.SUFFIXES:
|
| 27 |
.PHONY: publish all clean $(LANGUAGES) $(LANGUAGES-publish)
|
| 28 |
|
| 29 |
all: $(LANGUAGES)
|
| 30 |
|
| 31 |
$(LANGUAGES):
|
| 32 |
-$(MAKE) -C $@
|
| 33 |
|
| 34 |
publish: clean
|
| 35 |
ifneq "$(PUBLISHDIR)" ""
|
| 36 |
set -ex; \
|
| 37 |
for arch in $(arches); do \
|
| 38 |
$(MAKE) architecture=$$arch; \
|
| 39 |
$(makedir) $(PUBLISHDIR)/$$arch/release-notes; \
|
| 40 |
$(makedir) release-notes-$$arch; \
|
| 41 |
for lang in $(LANGUAGES); do \
|
| 42 |
$(makedir) release-notes-$$arch/$$lang; \
|
| 43 |
$(install_file) $$lang/release-notes.$$lang.html/* $(PUBLISHDIR)/$$arch/release-notes/; \
|
| 44 |
$(install_file) $$lang/release-notes.$$lang.txt $(PUBLISHDIR)/$$arch/; \
|
| 45 |
$(install_file) $$lang/release-notes.$$lang.pdf $(PUBLISHDIR)/$$arch/; \
|
| 46 |
$(install_file) $$lang/release-notes.$$lang.ps $(PUBLISHDIR)/$$arch/; \
|
| 47 |
$(install_file) $$lang/release-notes.$$lang.html/* release-notes-$$arch/$$lang; \
|
| 48 |
$(install_file) $$lang/release-notes.$$lang.txt release-notes-$$arch/$$lang; \
|
| 49 |
$(install_file) $$lang/release-notes.$$lang.pdf release-notes-$$arch/$$lang; \
|
| 50 |
done; \
|
| 51 |
for i in $(PUBLISHDIR)/$$arch/release-notes/*.en.html; do \
|
| 52 |
ln -sf `basename $$i` $${i%.en.html}.html; \
|
| 53 |
done; \
|
| 54 |
if [ -n "$(PUBLISHTARBALL)" ]; then (cd release-notes-$$arch && tar czf $(PUBLISHDIR)/release-notes-$$arch.tar.gz *); fi \
|
| 55 |
done
|
| 56 |
else
|
| 57 |
set -e; \
|
| 58 |
for arch in $(arches); do \
|
| 59 |
$(MAKE) architecture=$$arch; \
|
| 60 |
$(makedir) upgrade-$$arch; \
|
| 61 |
for lang in $(LANGUAGES); do \
|
| 62 |
$(install_file) $$lang/release-notes.$$lang.html/* upgrade-$$arch; \
|
| 63 |
$(install_file) $$lang/release-notes.$$lang.txt upgrade-$$arch; \
|
| 64 |
$(install_file) $$lang/release-notes.$$lang.pdf upgrade-$$arch; \
|
| 65 |
$(install_file) $$lang/release-notes.$$lang.ps upgrade-$$arch; \
|
| 66 |
done; \
|
| 67 |
ln -sf index.en.html upgrade-$$arch/index.html; \
|
| 68 |
ln -sf release-notes.en.txt upgrade-$$arch/Release-Notes; \
|
| 69 |
done
|
| 70 |
# Jens: where are ps and pdf versions?
|
| 71 |
# XXX needs to be updated for each release that introduces new architectures!
|
| 72 |
# for newarch in mips mipsel ia64 hppa s390; do \
|
| 73 |
# mv upgrade-$$newarch disks-$$newarch; \
|
| 74 |
# done
|
| 75 |
tar cjf relnotes.tar.bz2 upgrade-*
|
| 76 |
rm -rf upgrade-* disks-*
|
| 77 |
endif
|
| 78 |
|
| 79 |
clean::
|
| 80 |
rm -f dynamic*.ent relnotes.tar.bz2
|
| 81 |
find -name 'release-notes-*' -type d -maxdepth 1 -exec rm -fr {} \;
|
| 82 |
clean:: $(LANGUAGES-clean)
|
| 83 |
|
| 84 |
$(LANGUAGES-clean):
|
| 85 |
$(MAKE) -C $(subst -clean,,$@) clean
|