Commit 9bc726a0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

HACKING Makefile.am autogen.sh depend on intltool for handling i18n stuff.

2002-02-22  Sven Neumann  <sven@gimp.org>

	* HACKING
	* Makefile.am
	* autogen.sh
	* configure.in: depend on intltool for handling i18n stuff. This
	means that you need intltool to compile The GIMP from CVS. Grab
	it from ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/
	or out of gnomecvs module intltool. You shouldn't need it if you
	compile The GIMP from tarball.

	* data/misc/Makefile.am
	* data/misc/gimp.desktop.in.in: merge translations into the desktop
	file.
parent 239e53e7
2002-02-22 Sven Neumann <sven@gimp.org>
* HACKING
* Makefile.am
* autogen.sh
* configure.in: depend on intltool for handling i18n stuff. This
means that you need intltool to compile The GIMP from CVS. Grab
it from ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/
or out of gnomecvs module intltool. You shouldn't need it if you
compile The GIMP from tarball.
* data/misc/Makefile.am
* data/misc/gimp.desktop.in.in: merge translations into the desktop
file.
2002-02-22 Sven Neumann <sven@gimp.org>
* INSTALL
......
......@@ -11,7 +11,12 @@ These should be available by ftp from prep.ai.mit.edu or any of the
fine GNU mirrors. Beta software can be found at alpha.gnu.org.
- pkg-config 0.7.0 (or a newer version)
Available from http://www.freedesktop.org/software/pkgconfig
Available from http://www.freedesktop.org/software/pkgconfig/.
- intltoolize 0.11.1 (or newer version)
Available from ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/.
Compilation
......@@ -25,16 +30,19 @@ by running:
Basically this does the following for you:
cvsroot/gimp# aclocal; automake; autoconf
cvsroot/gimp# glib-gettextize; intltoolize
The above commands create the "configure" script. Now you
can run the configure script in cvsroot/gimp to create all
the Makefiles.
Before running autogen.sh or configure, make sure you have libtool in
your path. Also make sure glib-2.0.m4 glib-gettext.m4 and gtk-2.0.m4
are either installed in the same $prefix/share/aclocal relative to
your automake/aclocal installation or call autogen.sh with
'ACLOCAL_FLAGS="-I $prefix/share/aclocal" ./autogen.sh'.
your path. Also make sure glib-2.0.m4 glib-gettext.m4, gtk-2.0.m4,
pkg.m4 and intltool.m4 are either installed in the same
$prefix/share/aclocal relative to your automake/aclocal installation
or call autogen.sh with
'ACLOCAL_FLAGS="-I $prefix/share/aclocal" ./autogen.sh'.
Note that autogen.sh runs configure for you. If you wish to pass
options like --prefix=/usr to configure you can give those options to
......
......@@ -52,9 +52,9 @@ EXTRA_DIST = \
TODO \
TODO.xml \
config.h.win32 \
po/po2tbl.sed.in \
po/update.sh \
po/update.pl \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
po-libgimp/update.sh \
po-plug-ins/update.sh \
po-script-fu/script-fu-xgettext \
......
......@@ -19,7 +19,6 @@ DIE=0
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
......@@ -27,7 +26,6 @@ DIE=0
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
......@@ -35,10 +33,24 @@ DIE=0
echo "(or a newer version if it is available)"
DIE=1
}
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have glib-gettextize installed to compile $PROJECT."
echo "glib-gettextize is part of glib-2.0, so you should already"
echo "have it. Make sure it is in your PATH".
DIE=1
}
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have intltoolize installed to compile $PROJECT."
echo "Get the latest version from"
echo "ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/"
DIE=1
}
echo "I am testing that you have the required versions of libtool, autoconf"
echo "and automake. This test is not foolproof, so if anything goes wrong,"
echo "see the file HACKING for more information..."
echo "I am testing that you have the required versions of libtool, autoconf,"
echo "automake, glib-gettextize and intltoolize. This test is not foolproof,"
echo "so if anything goes wrong, see the file HACKING for more information..."
echo
echo "Testing libtool... "
......@@ -68,6 +80,23 @@ else
DIE=1
fi
echo "Testing glib-gettextize... "
VER=`glib-gettextize --version | grep glib-gettextize | sed "s/.* \([0-9.]*\)/\1/"`
if expr $VER \>= 1.3.14 >/dev/null; then
echo "looks OK."
else
echo "too old! (Need 1.3.14, have $VER)"
DIE=1
fi
echo "Testing intltoolize... "
VER=`intltoolize --version | grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
if expr $VER \>= 0.11 >/dev/null; then
echo "looks OK."
else
echo "too old! (Need 1.11, have $VER)"
DIE=1
fi
echo
if test "$DIE" -eq 1; then
......@@ -91,7 +120,7 @@ esac
if test -z "$ACLOCAL_FLAGS"; then
acdir=`aclocal --print-ac-dir`
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 pkg.m4"
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
for file in $m4list
do
......@@ -115,6 +144,11 @@ aclocal $ACLOCAL_FLAGS
automake --add-missing $am_opt
autoconf
echo "Running glib-gettextize"
glib-gettextize --copy --force
echo "Running intltoolize"
intltoolize --copy --force --automake
cd $ORIGDIR
$srcdir/configure --enable-maintainer-mode "$@"
......
......@@ -32,10 +32,6 @@ LT_AGE=`expr $GIMP_BINARY_AGE - $GIMP_INTERFACE_AGE`
VERSION=$GIMP_VERSION
PACKAGE=gimp
GETTEXT_PACKAGE=gimp14
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
dnl Specify a configuration file
......@@ -67,11 +63,13 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_CPP
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
if eval "test x$enable_debug = xyes"; then
DEBUGFLAG="-g"
fi)
dnl Why the heck isn't there already a macro for this?
dnl AC_ARG_WITH(gnu-make, [ --with-gnu-make assume 'make' understands gnu extensions],
......@@ -80,9 +78,11 @@ dnl if $ac_make -v 2>/dev/null | grep 'GNU Make' >/dev/null; then
dnl with_gnu_make=yes
dnl fi)
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
dnl Possibly change default gimpdir from .gimp
gimpdir=.$PACKAGE-$GIMP_MAJOR_VERSION.$GIMP_MINOR_VERSION
AC_ARG_ENABLE(gimpdir, [ --enable-gimpdir=DIR change default gimpdir from .gimp-1.3 to DIR],
......@@ -111,12 +111,22 @@ AC_SUBST(STRIP_DUMMY)
AC_SUBST(STRIP_BEGIN)
AC_SUBST(STRIP_END)
dnl i18n stuff
GETTEXT_PACKAGE=gimp14
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
ALL_LINGUAS="ca cs da de el en_GB es fi fr ga gl hu hr it ja ko nl no pl pt_BR ro ru sk sv tr uk zh_CN zh_TW"
AC_PROG_INTLTOOL
AM_GLIB_GNU_GETTEXT
AC_PATH_XTRA
AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,,
AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
gobject)
......
......@@ -5,15 +5,24 @@ miscdatadir = $(gimpdatadir)/misc
miscdata_SCRIPTS = \
user_install
miscdata_in_files = gimp.desktop.in.in
miscdata_DATA = $(miscdata_in_files:.desktop.in.in=.desktop)
EXTRA_DIST = \
$(miscdata_SCRIPTS) \
gimp.desktop.in.in \
user_install.bat
gen_sources = desktop-foo
CLEANFILES = $(gen_sources)
gimp.desktop: gimp.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po)
sed -e 's|.[{]prefix[}]|${prefix}|' $< > desktop-foo \
&& $(INTLTOOL_MERGE) $(top_srcdir)/po desktop-foo $(@) -d -u -c $(top_builddir)/po/.intltool-merge-cachemake \
&& rm -r desktop-foo
install-data-local:
sed -e 's|.[{]prefix[}]|${prefix}|' \
${srcdir}/gimp.desktop.in > ${srcdir}/gimp.desktop \
&& $(INSTALL) ${srcdir}/gimp.desktop $(DESTDIR)$(miscdatadir)
if GNOME_DESKTOP_PATH
if test -d @GNOME_DESKTOP_PATH@; then \
cd @GNOME_DESKTOP_PATH@ \
......
[Desktop Entry]
Name=The GIMP (unstable)
Name[bg]=GIMP
Name[ca]=El GIMP
Name[cs]=GIMP
Name[da]=Gimp'en
Name[de]=GIMP (instabil)
Name[el]=Το GIMP
Name[es]=El GIMP
Name[et]=GIMP Pilditöötlus
Name[eu]=GIMPa
Name[fi]=GIMP
Name[fr]=Le GIMP
Name[ga]=An GIMP
Name[gl]=O GIMP
Name[hu]=A GIMP
Name[it]=GIMP
Name[ja]=GIMP
Name[ko]=김프
Name[lt]=GIMP
Name[ms]=Editor Imej GIMP
Name[nl]=GIMP
Name[nn]=GIMP
Name[no]=GIMP
Name[pt]=O GIMP
Name[pt_BR]=O GIMP
Name[ro]=GIMP
Name[ru]=GIMP
Name[sk]=GIMP
Name[sl]=GIMP
Name[sp]=GNOME едитор мениja
Name[sr]=GNOME editor menija
Name[sv]=Bildredigeraren GIMP
Name[ta]=¸§É¡õ ÀðÊ À¾¢ôÀ¡ý
Name[tr]=GIMP
Name[uk]=GIMP
Name[wa]=Aspougneu di menus di GNOME
Name[zh_CN]=GIMP图像编辑器
Name[zh_TW]=GIMP
Comment=Create and edit images or photographs
Comment[bg]=Програма за Обработка на Изображения / GNU
Comment[ca]=El programa de manipulació d'imatges GNU
Comment[cs]=GNU program pro práci s obrázky
Comment[da]=Tegne- og billedbehandlingsprogram
Comment[de]=Das GNU-Bildbearbeitungsprogramm
Comment[el]=Πρόγραμμα Επεξεργασίας Εικόνων GNU
Comment[es]=Programa de manipulación de imágenes GNU
Comment[et]=Loo ja redigeeri pilte või fotosid
Comment[eu]=GNU imaginak eraldatzeko programa
Comment[fi]=GIMP-kuvankäsittelyohjelma
Comment[fr]=Le Programme de Manipulation d'Images GNU
Comment[ga]=Ríomhchlár láimhsiú íomhá GNU
Comment[gl]=O Programa de Edición de Imaxes de GNU
Comment[hu]=GNU képfeldolgozó program
Comment[it]=Programma di Manipolazione Immagini GNU
Comment[ja]=GNU画像編集プログラム
Comment[ko]=GNU 그림 편집 프로그램
Comment[lt]=GNU atvaizdų apdorojimo programa
Comment[ms]=Cipta dan edit imej atau fotograf
Comment[nl]=GNU beeldverwerkingsprogramma
Comment[no]=GNU bildebehandlingsprogram
Comment[pt]=Programa de Edição de Imagens GNU
Comment[pt_BR]=Programa de Edição de Imagens GNU
Comment[ro]=Program GNU pentru manipulare de imagine
Comment[ru]=Программа манипуляции изображения GNU
Comment[sk]=GNU Program pre spracovanie obrázkov
Comment[sl]=Program za manipuliranje s slikami GNU
Comment[sv]=Skapa eller redigera bilder eller fotografier
Comment[tr]=GNU Resim değiştirme uygulaması
Comment[uk]=Програма GNU маніпуляції зображенням
Comment[wa]=Li programe da GNU po-z aspougnî des imådjes
Comment[zh_CN]=创建和编辑图片或照片
Comment[zh_TW]=GNU 圖像處理程式
_Name=The GIMP (unstable)
_Comment=Create and edit images or photographs
Exec=gimp-1.3
Icon=@gimpdatadir@/images/wilber-icon.png
Terminal=0
......
......@@ -3,8 +3,6 @@
Makefile
Makefile.in
POTFILES
cat-id-tbl.c
*.pot
stamp-cat-id
messages
po2tbl.sed
.intltool-merge-cachemake
2002-02-22 Sven Neumann <sven@gimp.org>
* po/Makefile.in.in: changed by glib-gettextize and intltoolize.
* po/po2tbl.sed.in
* po/update.pl
* po/update.sh: removed, we use intltool now
* README.tools: mention intltool-update.
* po/POTFILES.in: added data/misc/gimp.desktop.in.in
* po/de.po: updated german translation
2002-02-22 Michael Natterer <mitch@gimp.org>
* POTFILES.in: gimpprogress.c -> display/gimpprogress.c
......
......@@ -9,8 +9,11 @@
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
......@@ -18,6 +21,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
......@@ -25,7 +29,7 @@ exec_prefix = @exec_prefix@
datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
gettextsrcdir = $(prefix)/share/glib-2.0/gettext/po
subdir = po
INSTALL = @INSTALL@
......@@ -37,7 +41,10 @@ GENCAT = @GENCAT@
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
MSGMERGE = PATH=../src:$$PATH msgmerge
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
DEFS = @DEFS@
CFLAGS = @CFLAGS@
......@@ -47,11 +54,11 @@ INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES = cat-id-tbl.c
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
......@@ -83,31 +90,11 @@ INSTOBJEXT = @INSTOBJEXT@
all: all-@USE_NLS@
all-yes: cat-id-tbl.c $(CATALOGS)
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(GETTEXT_PACKAGE).po \
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(GETTEXT_PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ./po2tbl.sed $(srcdir)/$(GETTEXT_PACKAGE).pot \
| sed -e "s/@GETTEXT_PACKAGE NAME@/$(GETTEXT_PACKAGE)/" > cat-id-tbl.tmp
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp; \
else \
echo cat-id-tbl.c changed; \
rm -f $(srcdir)/cat-id-tbl.c; \
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
fi
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
$(GENPOT)
install: install-exec install-data
install-exec:
......@@ -155,7 +142,7 @@ install-data-yes: all
fi; \
fi; \
done
if test "$(GETTEXT_PACKAGE)" = "gettext"; then \
if test "$(PACKAGE)" = "glib"; then \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
......@@ -184,8 +171,6 @@ uninstall:
check: all
cat-id-tbl.o: ../intl/libgettext.h
dvi info tags TAGS ID:
mostlyclean:
......@@ -195,14 +180,14 @@ mostlyclean:
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m po2tbl.sed
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
......@@ -218,9 +203,9 @@ update-po: Makefile
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
cp $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
if $(MSGMERGE) $$lang; then \
rm -f $$lang.old.po; \
else \
echo "msgmerge for $$cat failed!"; \
......@@ -229,6 +214,22 @@ update-po: Makefile
fi; \
done
.po: Makefile
$(MAKE) $(PACKAGE).pot;
PATH=`pwd`/../src:$$PATH; \
echo; printf "$*: "; \
if $(MSGMERGE) $*; then \
rm -f $*.old.po; \
else \
echo "msgmerge for * failed!"; \
mv $*.old.po $*.po; \
fi; \
msgfmt --statistics $*.po; echo;
# POTFILES is created from POTFILES.in by stripping comments, empty lines
# and Intltool tags (enclosed in square brackets), and appending a full
# relative path to them
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
......@@ -236,8 +237,10 @@ POTFILES: POTFILES.in
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
&& (sed -e '/^#/d' \
-e "s/^\[.*\] +//" \
-e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
......
......@@ -160,3 +160,5 @@ app/xcf/xcf.c
modules/colorsel_triangle.c
modules/colorsel_water.c
data/misc/gimp.desktop.in.in
The po/ directory includes two perlscripts, which is done to help
making the translations fully uptodate.
The first script is called update.pl and is supposed to be run like this:
./update.pl [OPTIONS] ...LANGCODE
This will updates the pot file (the po template, generated from the source code)
and merge them with the translations po files.
For instance to do this for Danish, type the following
./update.pl da
The update.pl script also supports other options, they are:
-V, --version shows the version
-H, --help shows this help page
-P, --pot only generates the potfile
-M, --maintain search for missing files in POTFILES.in
Especially the --maintain option is very handy for package maintainer, to check
if you included all the files that have marked strings in the POTFILES.in, so
they will be in the generated po template, the socalled pot file.
There is though one thing to take notice of with this option, please check the
configure.in file to make sure that the files you add to POTFILES.in are being
build, otherwise this can leed to "make dist" throuble.
The other utility is the desk.pl script, which will check the cvs module for
missing translation in files like *.desktop, *.directory, *.soundlist and so on.
Run the script like this:
./desk.pl [OPTIONS] ...LANGCODE ENTRY
An example use could be.
./desk.pl da
which will check all the files for missing Name[da] entries, or
./desk.pl no Comment
which will check all the files for missing Comment[no] entries. "Comment" can
here be replaced with whatever you like
All scripts support the --help option for further help, though it's not very
extensive for the moment.
Kenneth Christiansen
kenneth@gnu.org
kenneth@gnome.org
Both scripts are copyright 2000 The Free Software Foundation and me.
We use intltool. Try ../intltool-update --help
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment