Makefile revision 9725
9725N/A##
9725N/A# Makefile for generateing .po tarballs for Sun UI strings.
9725N/A#
9725N/A# Generates : $(PACKAGE)-po-sun-$(PO_VERSION).tar.bz2
9725N/A# e.g. po-sun-tarballs/*.tar.bz2
9725N/A#
9725N/A# Usage :
9725N/A# "make clean" : Remove previous tarballs
9725N/A#
9725N/A# "make" : Update all .po tarballs
9725N/A#
9725N/A# "make check-used" : Outputs list of .po not being used.
9725N/A#
9725N/A# "make check-version" : Prints current .po tarball version
9725N/A#
9725N/A# "make $(PACKAGE)-po-sun-$(PO_VERSION).tar.bz2
9725N/A# e.g. "make gnome-panel-po-sun-0.1.tar.bz2"
9725N/A# will only generate gnome-panel's .po tarball
9725N/A#
9725N/A# For each package that contains .po files.
9725N/A# - Ensure all .po files for your package are located under the
9725N/A# correct .po package dir i.e.
9725N/A# $package/ja.po
9725N/A#
9725N/A# - Add Package name to PACKAGES Variable
9725N/A# e.g. PACKAGES = \
9725N/A# gnome-panel \
9725N/A# your-package
9725N/A#
9725N/A# - Add two package specific variables
9725N/A# PACKAGE_PAGES - Full path of all po for this package
9725N/A# e.g. gnome-panel_PAGES = gnome-panel
9725N/A# PACKAGE.PAGES - Assigned to $(PACKAGE_PAGES).
9725N/A# e.g. gnome-panel.PAGES: $(gnome-panel_PAGES)
9725N/A#
9725N/A#
9725N/A# To Add new .po files to existing packages
9725N/A# -----------------------------------------
9725N/A# Put very simply, all that is required from engineers is to make some changes
9725N/A# and commit in SVN.
9725N/A#
9725N/A# - Ensure the .po file exists in SVN under the relevant package dir
9725N/A# - Add .po files to the <package> directory
9725N/A# e.g. For a new gnome-panel de.po file it would be added in
9725N/A# gnome-panel/de.po
9725N/A# - Remake tarballs
9725N/A# $ make clean
9725N/A# $ make
9725N/A# This will re-generate all .po tarballs.
9725N/A# - Copy newly generated tarball from po-sun-tarballs to package build
9725N/A# sources e.g. /jds/packages/SOURCES, and ensure package builds and po
9725N/A# install correctly.
9725N/A# - New .po tarball will be generated by RE for each nightly, and for each
9725N/A# milestone build.
9725N/A# - Commit change back to subverison, e.g. new/amended man pagees,
9725N/A# po-sun/Makefile, po-sun/package/*.po files if affected.
9725N/A#
9725N/A#
9725N/A# PO_VERSION is maintained by L10N and only gets bumped when spec-files gets
9725N/A# branched. PLEASE do not change this.
9725N/A# %po_sun_version is also updated in l10n.inc
9725N/A#
9725N/A
9725N/APO_VERSION=0.1
9725N/APO_DIR=po-sun
9725N/ATARBALL_DIR=po-sun-tarballs
9725N/ABZIP2=/usr/bin/bzip2.orig
9725N/ATAR=/usr/bin/tar
9725N/AAWK=/usr/bin/awk
9725N/AMAKE=/usr/sfw/bin/gmake
9725N/A
9725N/APACKAGES = \
9725N/A gnome-menus \
9725N/A gnome-panel \
9725N/A gnome-utils
9725N/A
9725N/Aall: TARBALLS
9725N/A
9725N/Agnome-menus_PAGES = gnome-menus/po-sun
9725N/Agnome-menus.PAGES: $(gnome-menus_PAGES)
9725N/A
9725N/Agnome-panel_PAGES = gnome-panel/po-sun
9725N/Agnome-panel.PAGES: $(gnome-panel_PAGES)
9725N/A
9725N/Agnome-utils_PAGES = gnome-utils/po-sun
9725N/Agnome-utils.PAGES: $(gnome-panel_PAGES)
9725N/A
9725N/ATARBALL_DIR_SUFFIX = po-sun-$(PO_VERSION)
9725N/A
9725N/A.SUFFIXES: -$(TARBALL_DIR_SUFFIX).tar.bz2 .PAGES
9725N/A.SUFFIXES: .check-used .PAGES
9725N/A
9725N/ATARBALLS = $(TARBALL_DIR)/$(addsuffix -$(TARBALL_DIR_SUFFIX).tar.bz2, $(PACKAGES))
9725N/A
9725N/A
9725N/ATARBALLS:
9725N/A @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
9725N/A @test -x $(BZIP2) || echo "bzip2 utility not found"
9725N/A @for package in $(PACKAGES); do \
9725N/A if test ! -f $(TARBALL_DIR)/$$package-$(TARBALL_DIR_SUFFIX).tar.bz2; then \
9725N/A $(MAKE) MAKE=\"$(MAKE)\" $$package-$(TARBALL_DIR_SUFFIX).tar.bz2; \
9725N/A fi; \
9725N/A done
9725N/A
9725N/A%-$(TARBALL_DIR_SUFFIX).tar.bz2: %.PAGES
9725N/A @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
9725N/A @if test -f $(TARBALL_DIR)/$@; then \
9725N/A rm -f $(TARBALL_DIR)/$@; \
9725N/A fi
9725N/A @test -d $(PO_DIR) || mkdir -p "$(PO_DIR)"
9725N/A @rm -rf $(PO_DIR)/*
9725N/A @for po_dir in $($(subst .PAGES,_PAGES,$<)); do \
9725N/A cp -R $$po_dir "$(PO_DIR)"; \
9725N/A base_po_dir=`basename $$po_dir`; \
9725N/A cp Makefile.template "$(PO_DIR)"/$$base_po_dir/Makefile; \
9725N/A done;
9725N/A @cd "$(PO_DIR)"; \
9725N/A tarball=`basename "$@" .bz2`; echo "Making tarball $$tarball"; \
9725N/A $(TAR) -cf ../$(TARBALL_DIR)/$$tarball *; \
9725N/A $(BZIP2) ../$(TARBALL_DIR)/$$tarball; \
9725N/A cd ..
9725N/A @rm -rf $(PO_DIR)
9725N/A
9725N/Acheck-used:
9725N/A @test -d check-used-po-sun || mkdir -p "check-used-po-sun"
9725N/A @test -d check-all-po-sun || mkdir -p "check-all-po-sun"
9725N/A @rm -f unused-po-sun.txt
9725N/A @for package in $(PACKAGES); do \
9725N/A $(MAKE) MAKE=\"$(MAKE)\" $$package.check-used; \
9725N/A done
9725N/A @rm -rf check-all-po-sun
9725N/A @rm -rf check-used-po-sun
9725N/A
9725N/A%.check-used: %.PAGES
9725N/A @for package in $($(subst .PAGES,_PAGES,$<)); do \
9725N/A touch check-used-po-sun/$$package; \
9725N/A done
9725N/A
9725N/Acheck-version:
9725N/A @echo $(PO_VERSION)
9725N/A
9725N/Aclean:
9725N/A rm -rf $(PO_DIR)
9725N/A rm -rf $(TARBALL_DIR)
9725N/A