1 ## 2 # Makefile for generateing .po tarballs for Sun UI strings. 3 # 4 # Generates : $(PACKAGE)-po-sun-$(PO_VERSION).tar.bz2 5 # e.g. po-sun-tarballs/*.tar.bz2 6 # 7 # Usage : 8 # "make clean" : Remove previous tarballs 9 # 10 # "make" : Update all .po tarballs 11 # 12 # "make check-used" : Outputs list of .po not being used. 13 # 14 # "make check-version" : Prints current .po tarball version 15 # 16 # "make $(PACKAGE)-po-sun-$(PO_VERSION).tar.bz2 17 # e.g. "make gnome-panel-po-sun-0.1.tar.bz2" 18 # will only generate gnome-panel's .po tarball 19 # 20 # For each package that contains .po files. 21 # - Ensure all .po files for your package are located under the 22 # correct .po package dir i.e. 23 # $package/ja.po 24 # 25 # - Add Package name to PACKAGES Variable 26 # e.g. PACKAGES = \ 27 # gnome-panel \ 28 # your-package 29 # 30 # - Add two package specific variables 31 # PACKAGE_PAGES - Full path of all po for this package 32 # e.g. gnome-panel_PAGES = gnome-panel 33 # PACKAGE.PAGES - Assigned to $(PACKAGE_PAGES). 34 # e.g. gnome-panel.PAGES: $(gnome-panel_PAGES) 35 # 36 # 37 # To Add new .po files to existing packages 38 # ----------------------------------------- 39 # Put very simply, all that is required from engineers is to make some changes 40 # and commit in SVN. 41 # 42 # - Ensure the .po file exists in SVN under the relevant package dir 43 # - Add .po files to the <package> directory 44 # e.g. For a new gnome-panel de.po file it would be added in 45 # gnome-panel/de.po 46 # - Remake tarballs 47 # $ make clean 48 # $ make 49 # This will re-generate all .po tarballs. 50 # - Copy newly generated tarball from po-sun-tarballs to package build 51 # sources e.g. /jds/packages/SOURCES, and ensure package builds and po 52 # install correctly. 53 # - New .po tarball will be generated by RE for each nightly, and for each 54 # milestone build. 55 # - Commit change back to subverison, e.g. new/amended man pagees, 56 # po-sun/Makefile, po-sun/package/*.po files if affected. 57 # 58 # 59 # PO_VERSION is maintained by L10N and only gets bumped when spec-files gets 60 # branched. PLEASE do not change this. 61 # %po_sun_version is also updated in l10n.inc 62 # 63 64 PO_VERSION=0.1 65 PO_DIR=po-sun 66 TARBALL_DIR=po-sun-tarballs 67 BZIP2=/usr/bin/bzip2 68 TAR=/usr/bin/tar 69 AWK=/usr/bin/awk 70 MAKE=/usr/sfw/bin/gmake 71 72 PACKAGES = \ 73 dasher \ 74 ekiga \ 75 eog \ 76 evince \ 77 evolution \ 78 file-roller \ 79 gaim \ 80 gcalctool \ 81 gdm \ 82 gedit \ 83 gimp \ 84 glade \ 85 gnome-control-center \ 86 gnome-desktop \ 87 gnome-media \ 88 gnome-menus \ 89 gnome-panel \ 90 gnome-pilot \ 91 gnome-session \ 92 gnome-system-monitor \ 93 gnome-system-tools \ 94 gnome-terminal \ 95 gnome-utils \ 96 gnome-vfs \ 97 gok \ 98 gthumb \ 99 gtk2 \ 100 gtkam \ 101 gucharmap \ 102 libwnck \ 103 metacity \ 104 nautilus \ 105 printman \ 106 sound-juicer \ 107 totem 108 109 all: TARBALLS 110 111 gnome-control-center_PAGES = gnome-control-center/po-sun 112 gnome-control-center.PAGES: $(gnome-control-center_PAGES) 113 114 dasher_PAGES = dasher/po-sun 115 dasher.PAGES: $(dasher_PAGES) 116 117 ekiga_PAGES = ekiga/po-sun 118 ekiga.PAGES: $(ekiga_PAGES) 119 120 eog_PAGES = eog/po-sun 121 eog.PAGES: $(eog_PAGES) 122 123 evince_PAGES = evince/po-sun 124 evince.PAGES: $(evince_PAGES) 125 126 evolution_PAGES = evolution/po-sun 127 evolution.PAGES: $(evolution_PAGES) 128 129 file-roller_PAGES = file-roller/po-sun 130 file-roller.PAGES: $(file-roller_PAGES) 131 132 gaim_PAGES = gaim/po-sun 133 gaim.PAGES: $(gaim_PAGES) 134 135 gcalctool_PAGES = gcalctool/po-sun 136 gcalctool.PAGES: $(gcalctool_PAGES) 137 138 gdm_PAGES = gdm/po-sun 139 gdm.PAGES: $(gdm_PAGES) 140 141 gedit_PAGES = gedit/po-sun 142 gedit.PAGES: $(gedit_PAGES) 143 144 gimp_PAGES = gimp/po-sun 145 gimp.PAGES: $(gimp_PAGES) 146 147 glade_PAGES = glade/po-sun 148 glade.PAGES: $(glade_PAGES) 149 150 gnome-desktop_PAGES = gnome-desktop/po-sun 151 gnome-desktop.PAGES: $(gnome-desktop_PAGES) 152 153 gnome-media_PAGES = gnome-media/po-sun 154 gnome-media.PAGES: $(gnome-media_PAGES) 155 156 gnome-menus_PAGES = gnome-menus/po-sun 157 gnome-menus.PAGES: $(gnome-menus_PAGES) 158 159 gnome-panel_PAGES = gnome-panel/po-sun 160 gnome-panel.PAGES: $(gnome-panel_PAGES) 161 162 gnome-pilot_PAGES = gnome-pilot/po-sun 163 gnome-pilot.PAGES: $(gnome-pilot_PAGES) 164 165 gnome-session_PAGES = gnome-session/po-sun gnome-session/po-logout 166 gnome-session.PAGES: $(gnome-session_PAGES) 167 168 gnome-system-monitor_PAGES = gnome-system-monitor/po-sun 169 gnome-system-monitor.PAGES: $(gnome-system-monitor_PAGES) 170 171 gnome-system-tools_PAGES = gnome-system-tools/po-sun 172 gnome-system-tools.PAGES: $(gnome-system-tools_PAGES) 173 174 gnome-terminal_PAGES = gnome-terminal/po-sun 175 gnome-terminal.PAGES: $(gnome-terminal_PAGES) 176 177 gnome-utils_PAGES = gnome-utils/po-sun 178 gnome-utils.PAGES: $(gnome-utils_PAGES) 179 180 gnome-vfs_PAGES = gnome-vfs/po-sun 181 gnome-vfs.PAGES: $(gnome-vfs_PAGES) 182 183 gok_PAGES = gok/po-sun 184 gok.PAGES: $(gok_PAGES) 185 186 gthumb_PAGES = gthumb/po-sun 187 gthumb.PAGES: $(gthumb_PAGES) 188 189 gtk2_PAGES = gtk2/po-sun 190 gtk2.PAGES: $(gtk2_PAGES) 191 192 gtkam_PAGES = gtkam/po-sun 193 gtkam.PAGES: $(gtkam_PAGES) 194 195 gucharmap_PAGES = gucharmap/po-sun 196 gucharmap.PAGES: $(gucharmap_PAGES) 197 198 libwnck_PAGES = libwnck/po-sun 199 libwnck.PAGES: $(libwnck_PAGES) 200 201 metacity_PAGES = metacity/po-sun 202 metacity.PAGES: $(metacity_PAGES) 203 204 nautilus_PAGES = nautilus/po-sun 205 nautilus.PAGES: $(nautilus_PAGES) 206 207 printman_PAGES = printman/po-sun 208 printman.PAGES: $(printman_PAGES) 209 210 sound-juicer_PAGES = sound-juicer/po-sun 211 sound-juicer.PAGES: $(sound-juicer_PAGES) 212 213 totem_PAGES = totem/po-sun 214 totem.PAGES: $(totem_PAGES) 215 216 TARBALL_DIR_SUFFIX = po-sun-$(PO_VERSION) 217 218 .SUFFIXES: -$(TARBALL_DIR_SUFFIX).tar.bz2 .PAGES 219 .SUFFIXES: .check-used .PAGES 220 221 TARBALLS = $(TARBALL_DIR)/$(addsuffix -$(TARBALL_DIR_SUFFIX).tar.bz2, $(PACKAGES)) 222 223 224 TARBALLS: 225 @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)" 226 @test -x $(BZIP2) || echo "bzip2 utility not found" 227 @for package in $(PACKAGES); do \ 228 if test ! -f $(TARBALL_DIR)/$$package-$(TARBALL_DIR_SUFFIX).tar.bz2; then \ 229 $(MAKE) MAKE=\"$(MAKE)\" $$package-$(TARBALL_DIR_SUFFIX).tar.bz2; \ 230 fi; \ 231 done 232 233 %-$(TARBALL_DIR_SUFFIX).tar.bz2: %.PAGES 234 @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)" 235 @if test -f $(TARBALL_DIR)/$@; then \ 236 rm -f $(TARBALL_DIR)/$@; \ 237 fi 238 @test -d $(PO_DIR) || mkdir -p "$(PO_DIR)" 239 @rm -rf $(PO_DIR)/* 240 @for po_dir in $($(subst .PAGES,_PAGES,$<)); do \ 241 cp -R $$po_dir "$(PO_DIR)"; \ 242 base_po_dir=`basename $$po_dir`; \ 243 cp Makefile.template "$(PO_DIR)"/$$base_po_dir/Makefile; \ 244 done; 245 @cd "$(PO_DIR)"; \ 246 tarball=`basename "$@" .bz2`; echo "Making tarball $$tarball"; \ 247 $(TAR) -cf ../$(TARBALL_DIR)/$$tarball *; \ 248 $(BZIP2) ../$(TARBALL_DIR)/$$tarball; \ 249 cd .. 250 @rm -rf $(PO_DIR) 251 252 check-used: 253 @test -d check-used-po-sun || mkdir -p "check-used-po-sun" 254 @test -d check-all-po-sun || mkdir -p "check-all-po-sun" 255 @rm -f unused-po-sun.txt 256 @for package in $(PACKAGES); do \ 257 $(MAKE) MAKE=\"$(MAKE)\" $$package.check-used; \ 258 done 259 @rm -rf check-all-po-sun 260 @rm -rf check-used-po-sun 261 262 %.check-used: %.PAGES 263 @for package in $($(subst .PAGES,_PAGES,$<)); do \ 264 touch check-used-po-sun/$$package; \ 265 done 266 267 check-version: 268 @echo $(PO_VERSION) 269 270 clean: 271 rm -rf $(PO_DIR) 272 rm -rf $(TARBALL_DIR) 273 274