Commit d34ff553 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

libgimpbase/Makefile.am libgimpbase/gimpbase.h added new files that hold

2006-08-29  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimprectangle.[ch]: added new files that hold
	gimp_rectangle_intersect(), factored out of the core.

	* libgimpbase/gimpbase.def: updated.

	* app/core/gimp-edit.c
	* app/core/gimp-utils.c
	* app/core/gimp-utils.h
	* app/core/gimpchannel-combine.c
	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/core/gimpscanconvert.c
	* app/display/gimpdisplayshell-draw.c: changed includes accordingly.

	* libgimp/gimpdrawablepreview.c: don't duplicate
	gimp_rectangle_intersect() here, use the function in libgimpbase.

	* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
	working area to the region of interest. Fixes bug #340422.
parent 11f76bbd
2006-08-29 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimprectangle.[ch]: added new files that hold
gimp_rectangle_intersect(), factored out of the core.
* libgimpbase/gimpbase.def: updated.
* app/core/gimp-edit.c
* app/core/gimp-utils.c
* app/core/gimp-utils.h
* app/core/gimpchannel-combine.c
* app/core/gimpdrawable-foreground-extract.c
* app/core/gimpdrawable-transform.c
* app/core/gimpdrawable.c
* app/core/gimpimage-preview.c
* app/core/gimplayer.c
* app/core/gimpscanconvert.c
* app/display/gimpdisplayshell-draw.c: changed includes accordingly.
* libgimp/gimpdrawablepreview.c: don't duplicate
gimp_rectangle_intersect() here, use the function in libgimpbase.
* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
working area to the region of interest. Fixes bug #340422.
2006-08-29 Sven Neumann <sven@gimp.org>
* plug-ins/common/postscript.c (dither_grey): code cleanup and fix
......
......@@ -39,6 +39,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "base-types.h"
......@@ -1095,10 +1096,9 @@ siox_foreground_extract (SioxState *state,
siox_progress_update (progress_callback, progress_data, 0.5);
/* Reduce the working area to the region of interest */
x = x1;
y = y1;
width = x2 - x1;
height = y2 - y1;
gimp_rectangle_intersect (x1, y1, x2 - x1, y2 - y1,
x, y, width, height,
&x, &y, &width, &height);
/* Classify - the cached way....Better: Tree traversation? */
......
......@@ -22,6 +22,8 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "base/pixel-region.h"
......@@ -33,7 +35,6 @@
#include "gimp.h"
#include "gimp-edit.h"
#include "gimp-utils.h"
#include "gimpbuffer.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
......
......@@ -22,6 +22,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "core-types.h"
......@@ -35,7 +36,6 @@
#include "paint-funcs/scale-funcs.h"
#include "gimp.h"
#include "gimp-utils.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
......
......@@ -54,36 +54,6 @@
#include "gimpparamspecs.h"
gboolean
gimp_rectangle_intersect (gint x1,
gint y1,
gint width1,
gint height1,
gint x2,
gint y2,
gint width2,
gint height2,
gint *dest_x,
gint *dest_y,
gint *dest_width,
gint *dest_height)
{
gint d_x, d_y;
gint d_w, d_h;
d_x = MAX (x1, x2);
d_y = MAX (y1, y2);
d_w = MIN (x1 + width1, x2 + width2) - d_x;
d_h = MIN (y1 + height1, y2 + height2) - d_y;
if (dest_x) *dest_x = d_x;
if (dest_y) *dest_y = d_y;
if (dest_width) *dest_width = d_w;
if (dest_height) *dest_height = d_h;
return (d_w > 0 && d_h > 0);
}
gint64
gimp_g_type_instance_get_memsize (GTypeInstance *instance)
{
......
......@@ -20,19 +20,6 @@
#define __APP_GIMP_UTILS_H__
gboolean gimp_rectangle_intersect (gint x1,
gint y1,
gint width1,
gint height1,
gint x2,
gint y2,
gint width2,
gint height2,
gint *dest_x,
gint *dest_y,
gint *dest_width,
gint *dest_height);
gint64 gimp_g_type_instance_get_memsize (GTypeInstance *instance);
gint64 gimp_g_object_get_memsize (GObject *object);
gint64 gimp_g_hash_table_get_memsize (GHashTable *hash);
......
......@@ -20,6 +20,8 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "paint-funcs/paint-funcs.h"
......@@ -27,7 +29,6 @@
#include "base/pixel-processor.h"
#include "base/pixel-region.h"
#include "gimp-utils.h"
#include "gimpchannel.h"
#include "gimpchannel-combine.h"
......
......@@ -20,6 +20,8 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "base/pixel-region.h"
......@@ -32,7 +34,6 @@
#include "gimpimage.h"
#include "gimpimage-colormap.h"
#include "gimpprogress.h"
#include "gimp-utils.h"
#include "gimp-intl.h"
......
......@@ -22,6 +22,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "core-types.h"
......@@ -35,7 +36,6 @@
#include "paint-funcs/scale-funcs.h"
#include "gimp.h"
#include "gimp-utils.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
......
......@@ -20,6 +20,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpcolor/gimpcolor.h"
#include "core-types.h"
......@@ -32,7 +33,6 @@
#include "paint-funcs/paint-funcs.h"
#include "paint-funcs/scale-funcs.h"
#include "gimp-utils.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpdrawable-combine.h"
......
......@@ -20,6 +20,8 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "base/pixel-region.h"
......@@ -30,7 +32,6 @@
#include "config/gimpcoreconfig.h"
#include "gimp.h"
#include "gimp-utils.h"
#include "gimpdrawable-preview.h"
#include "gimpimage.h"
#include "gimpimage-preview.h"
......
......@@ -23,6 +23,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "core-types.h"
......@@ -34,7 +35,6 @@
#include "paint-funcs/paint-funcs.h"
#include "gimp-utils.h"
#include "gimpcontext.h"
#include "gimpcontainer.h"
#include "gimpdrawable-convert.h"
......
......@@ -25,6 +25,7 @@
#include <libart_lgpl/libart.h>
#include <libart_lgpl/art_svp_intersect.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "core-types.h"
......@@ -33,7 +34,6 @@
#include "base/tile-manager.h"
#include "gimpscanconvert.h"
#include "gimp-utils.h"
struct _GimpScanConvert
......
......@@ -20,9 +20,10 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "display-types.h"
#include "core/gimp-utils.h"
#include "core/gimpcontext.h"
#include "core/gimpgrid.h"
#include "core/gimpguide.h"
......
......@@ -353,36 +353,6 @@ _gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area,
}
}
static gboolean
gimp_rectangle_intersect (gint x1,
gint y1,
gint width1,
gint height1,
gint x2,
gint y2,
gint width2,
gint height2,
gint *dest_x,
gint *dest_y,
gint *dest_width,
gint *dest_height)
{
gint d_x, d_y;
gint d_w, d_h;
d_x = MAX (x1, x2);
d_y = MAX (y1, y2);
d_w = MIN (x1 + width1, x2 + width2) - d_x;
d_h = MIN (y1 + height1, y2 + height2) - d_y;
if (dest_x) *dest_x = d_x;
if (dest_y) *dest_y = d_y;
if (dest_width) *dest_width = d_w;
if (dest_height) *dest_height = d_h;
return (d_w > 0 && d_h > 0);
}
static void
gimp_drawable_preview_draw_area (GimpDrawablePreview *preview,
gint x,
......
......@@ -102,6 +102,8 @@ libgimpbase_sources = \
gimpparasiteio.h \
gimpprotocol.c \
gimpprotocol.h \
gimprectangle.c \
gimprectangle.h \
gimpreloc.c \
gimpreloc.h \
gimpsignal.c \
......@@ -135,6 +137,7 @@ libgimpbaseinclude_HEADERS = \
gimpmemsize.h \
gimpparasite.h \
gimpparasiteio.h \
gimprectangle.h \
gimpsignal.h \
gimpunit.h \
gimputils.h
......
......@@ -81,6 +81,7 @@ EXPORTS
gimp_pixpipe_params_parse
gimp_plug_in_directory
gimp_progress_command_get_type
gimp_rectangle_intersect
gimp_repeat_mode_get_type
gimp_run_mode_get_type
gimp_signal_private
......
......@@ -30,6 +30,7 @@
#include <libgimpbase/gimplimits.h>
#include <libgimpbase/gimpmemsize.h>
#include <libgimpbase/gimpparasite.h>
#include <libgimpbase/gimprectangle.h>
#include <libgimpbase/gimpunit.h>
#include <libgimpbase/gimputils.h>
#include <libgimpbase/gimpversion.h>
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimprectangle.c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib.h>
#include "gimprectangle.h"
/**
* gimp_rectangle_intersect:
* @x1: origin of first rectangle
* @y1: origin of first rectangle
* @width1: width of first rectangle
* @height1: height of first rectangle
* @x2: origin of second rectangle
* @y2: origin of second rectangle
* @width2: width of second rectangle
* @height2: height of second rectangle
* @dest_x: return location for origin of intersection (may be %NULL)
* @dest_y: return location for origin of intersection (may be %NULL)
* @dest_width: return location for width of intersection (may be %NULL)
* @dest_height: return location for height of intersection (may be %NULL)
*
* Calculates the intersection of two rectangles.
*
* Return value: %TRUE if the intersection is non-empty, %FALSE otherwise
*
* Since: GIMP 2.4
*/
gboolean
gimp_rectangle_intersect (gint x1,
gint y1,
gint width1,
gint height1,
gint x2,
gint y2,
gint width2,
gint height2,
gint *dest_x,
gint *dest_y,
gint *dest_width,
gint *dest_height)
{
gint d_x, d_y;
gint d_w, d_h;
d_x = MAX (x1, x2);
d_y = MAX (y1, y2);
d_w = MIN (x1 + width1, x2 + width2) - d_x;
d_h = MIN (y1 + height1, y2 + height2) - d_y;
if (dest_x) *dest_x = d_x;
if (dest_y) *dest_y = d_y;
if (dest_width) *dest_width = d_w;
if (dest_height) *dest_height = d_h;
return (d_w > 0 && d_h > 0);
}
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_RECTANGLE_H__
#define __GIMP_RECTANGLE_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
gboolean gimp_rectangle_intersect (gint x1,
gint y1,
gint width1,
gint height1,
gint x2,
gint y2,
gint width2,
gint height2,
gint *dest_x,
gint *dest_y,
gint *dest_width,
gint *dest_height);
G_END_DECLS
#endif /* __GIMP_RECTANGLE_H__ */
......@@ -11,13 +11,17 @@
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
......@@ -27,20 +31,19 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
localedir = $(libdir)/locale
gnulocaledir = $(datadir)/locale
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
mkdir_p = @mkdir_p@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
......@@ -49,35 +52,26 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
ALL_LINGUAS = @ALL_LINGUAS@
INCLUDES = -I.. -I$(top_srcdir)/intl
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
$(POFILES) $(GMOFILES) $(SOURCES)
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
#This Gets Replace for some reason
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.SUFFIXES: .po .pox .gmo .mo .msg .cat
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(top_builddir)/po/$(GETTEXT_PACKAGE).pot -o $*pox
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
......@@ -88,7 +82,7 @@ INSTOBJEXT = @INSTOBJEXT@
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
......@@ -99,115 +93,98 @@ all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-exec install-data
install-exec:
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -n "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
$(mkdir_p) $(DESTDIR)$(itlocaledir)
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -n "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $$dir; \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "glib"; then \
if test -n "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Empty stubs to satisfy archaic automake needs
dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
fi
check: all
dvi info tags TAGS ID:
check: all $(GETTEXT_PACKAGE).pot
mostlyclean:
rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -fr *.o
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
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)
rm -f Makefile.in.in
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
......@@ -223,32 +200,20 @@ update-po: Makefile
fi; \
fi; \
else \
echo "msgmerge for $$cat failed!"; \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
# POTFILES is created from POTFILES.in by stripping comments, empty lines