2001-08-23 09:40:23 -07:00
|
|
|
# Makefile for program source directory in GNU NLS utilities package.
|
2002-02-25 10:09:36 -08:00
|
|
|
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
2001-08-23 09:40:23 -07:00
|
|
|
#
|
|
|
|
# This file file be copied and used freely without restrictions. It can
|
2002-02-25 10:09:36 -08:00
|
|
|
# be used in projects which are not available under the GNU General Public License
|
2001-08-23 09:40:23 -07:00
|
|
|
# but which still want to provide support for the GNU gettext functionality.
|
|
|
|
# Please note that the actual code is *not* freely available.
|
|
|
|
|
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
|
|
|
|
2002-02-25 10:09:36 -08:00
|
|
|
# These two variables depend on the location of this directory.
|
|
|
|
subdir = po
|
|
|
|
top_builddir = ..
|
|
|
|
|
2001-08-23 09:40:23 -07:00
|
|
|
SHELL = /bin/sh
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2002-02-25 10:09:36 -08:00
|
|
|
datadir = @datadir@
|
2001-08-23 09:40:23 -07:00
|
|
|
localedir = $(datadir)/locale
|
2002-02-25 10:09:36 -08:00
|
|
|
gettextsrcdir = $(datadir)/gettext/po
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2002-02-25 10:09:36 -08:00
|
|
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
|
|
|
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
CC = @CC@
|
2002-02-25 10:09:36 -08:00
|
|
|
GMSGFMT = @GMSGFMT@
|
2001-08-23 09:40:23 -07:00
|
|
|
MSGFMT = @MSGFMT@
|
2002-02-25 10:09:36 -08:00
|
|
|
XGETTEXT = @XGETTEXT@
|
|
|
|
MSGMERGE = msgmerge
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
DEFS = @DEFS@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
|
|
|
|
INCLUDES = -I.. -I$(top_srcdir)/intl
|
|
|
|
|
|
|
|
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
|
|
|
|
|
|
|
POFILES = @POFILES@
|
|
|
|
GMOFILES = @GMOFILES@
|
|
|
|
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
2002-02-25 10:09:36 -08:00
|
|
|
$(POFILES) $(GMOFILES)
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
POTFILES = \
|
|
|
|
|
|
|
|
CATALOGS = @CATALOGS@
|
|
|
|
|
|
|
|
.SUFFIXES:
|
2002-02-25 10:09:36 -08:00
|
|
|
.SUFFIXES: .c .o .po .pox .gmo .mo
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(COMPILE) $<
|
|
|
|
|
|
|
|
.po.pox:
|
|
|
|
$(MAKE) $(PACKAGE).pot
|
|
|
|
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
|
|
|
|
|
|
|
.po.mo:
|
|
|
|
$(MSGFMT) -o $@ $<
|
|
|
|
|
|
|
|
.po.gmo:
|
|
|
|
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
2002-02-25 10:09:36 -08:00
|
|
|
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
all: all-@USE_NLS@
|
|
|
|
|
2002-02-25 10:09:36 -08:00
|
|
|
all-yes: $(CATALOGS)
|
2001-08-23 09:40:23 -07:00
|
|
|
all-no:
|
|
|
|
|
2002-02-25 10:09:36 -08:00
|
|
|
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
|
|
|
|
# otherwise packages like GCC can not be built if only parts of the source
|
|
|
|
# have been downloaded.
|
|
|
|
|
|
|
|
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
|
2001-08-23 09:40:23 -07:00
|
|
|
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
|
|
|
--add-comments --keyword=_ --keyword=N_ \
|
|
|
|
--files-from=$(srcdir)/POTFILES.in \
|
|
|
|
&& test ! -f $(PACKAGE).po \
|
|
|
|
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
|
|
|
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
|
|
|
|
|
|
|
|
|
|
|
install: install-exec install-data
|
|
|
|
install-exec:
|
|
|
|
install-data: install-data-@USE_NLS@
|
2002-02-25 10:09:36 -08:00
|
|
|
if test "$(PACKAGE)" = "gettext"; then \
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
|
|
|
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
2001-11-03 23:38:42 -08:00
|
|
|
else \
|
2002-02-25 10:09:36 -08:00
|
|
|
: ; \
|
2001-11-03 23:38:42 -08:00
|
|
|
fi
|
2002-02-25 10:09:36 -08:00
|
|
|
install-data-no: all
|
|
|
|
install-data-yes: all
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
2001-08-23 09:40:23 -07:00
|
|
|
@catalogs='$(CATALOGS)'; \
|
|
|
|
for cat in $$catalogs; do \
|
|
|
|
cat=`basename $$cat`; \
|
2002-02-25 10:09:36 -08:00
|
|
|
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
|
|
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
2001-08-23 09:40:23 -07:00
|
|
|
if test -r $$cat; then \
|
2002-02-25 10:09:36 -08:00
|
|
|
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
|
|
|
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
2001-08-23 09:40:23 -07:00
|
|
|
else \
|
2002-02-25 10:09:36 -08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
2001-08-23 09:40:23 -07:00
|
|
|
echo "installing $(srcdir)/$$cat as" \
|
2002-02-25 10:09:36 -08:00
|
|
|
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
2001-08-23 09:40:23 -07:00
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Define this as empty until I found a useful application.
|
|
|
|
installcheck:
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
catalogs='$(CATALOGS)'; \
|
|
|
|
for cat in $$catalogs; do \
|
|
|
|
cat=`basename $$cat`; \
|
2002-02-25 10:09:36 -08:00
|
|
|
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
|
|
|
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
|
2001-08-23 09:40:23 -07:00
|
|
|
done
|
2002-02-25 10:09:36 -08:00
|
|
|
if test "$(PACKAGE)" = "gettext"; then \
|
|
|
|
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
|
|
|
else \
|
|
|
|
: ; \
|
|
|
|
fi
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
check: all
|
|
|
|
|
|
|
|
dvi info tags TAGS ID:
|
|
|
|
|
|
|
|
mostlyclean:
|
2002-02-25 10:09:36 -08:00
|
|
|
rm -f core core.* *.pox $(PACKAGE).po *.new.po
|
2001-08-23 09:40:23 -07:00
|
|
|
rm -fr *.o
|
|
|
|
|
|
|
|
clean: mostlyclean
|
|
|
|
|
|
|
|
distclean: clean
|
2002-02-25 10:09:36 -08:00
|
|
|
rm -f Makefile Makefile.in POTFILES *.mo
|
2001-08-23 09:40:23 -07:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2002-02-25 10:09:36 -08:00
|
|
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
|
|
|
dist distdir:
|
|
|
|
$(MAKE) update-po
|
|
|
|
@$(MAKE) dist2
|
|
|
|
# This is a separate target because 'update-po' must be executed before.
|
|
|
|
dist2: $(DISTFILES)
|
2001-08-23 09:40:23 -07:00
|
|
|
dists="$(DISTFILES)"; \
|
|
|
|
for file in $$dists; do \
|
2002-02-25 10:09:36 -08:00
|
|
|
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
|
|
|
cp -p $$dir/$$file $(distdir); \
|
2001-08-23 09:40:23 -07:00
|
|
|
done
|
|
|
|
|
|
|
|
update-po: Makefile
|
|
|
|
$(MAKE) $(PACKAGE).pot
|
2002-02-25 10:09:36 -08:00
|
|
|
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
|
2001-08-23 09:40:23 -07:00
|
|
|
cd $(srcdir); \
|
2002-02-25 10:09:36 -08:00
|
|
|
catalogs='$(GMOFILES)'; \
|
2001-08-23 09:40:23 -07:00
|
|
|
for cat in $$catalogs; do \
|
|
|
|
cat=`basename $$cat`; \
|
2002-02-25 10:09:36 -08:00
|
|
|
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
2001-08-23 09:40:23 -07:00
|
|
|
echo "$$lang:"; \
|
2002-02-25 10:09:36 -08:00
|
|
|
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
|
|
|
|
mv -f $$lang.new.po $$lang.po; \
|
2001-08-23 09:40:23 -07:00
|
|
|
else \
|
|
|
|
echo "msgmerge for $$cat failed!"; \
|
2002-02-25 10:09:36 -08:00
|
|
|
rm -f $$lang.new.po; \
|
2001-08-23 09:40:23 -07:00
|
|
|
fi; \
|
|
|
|
done
|
2002-02-25 10:09:36 -08:00
|
|
|
$(MAKE) update-gmo
|
Alright, I spent some time now reading e17's code. Here's what
I've changed, this is big, so read this carefully :)
* I've added debugging macros for messages and function call
tracing. Usage:
D("Creating item %i %i %i\n", x, y, z);
Define DEBUG to use the D macro.
D_ENTER;
D_RETURN;
D_RETURN_(x);
These are for call tracing. Use D_RETURN_(x) when returning
something from a function. Define DEBUG_NEST to use this.
* added iconbar header file to Makefile.am
* added proper new()/cleanup() calls for E_Delayed_Action;
* I've completely rewritten the object and observer handling. Bye
bye macros, this was nasty. It'll be hard enough to avoid leaks
with usecounting in C. We now basically have the same system as gtk.
There's a clear separation of observer and object code now.
An E_Object by itself has nothing to do with observing or being
observed, therefore, there are now E_Observers and E_Observees
that are derived from E_Object. IMPORTANT: The cleanup system now
reflects the reference count system, therefore, all ..._free()
calls are now static, because the destructor should never be called explicitly, but implicitly through e_object_unref(). The object handling
now is as follows:
- The cleanup functions clean up everything that is contained in
a struct, but NOT the struct itself. Instead of the final
free() call, they call the destructor of the base class. The
calls will walk up the hierarchy and clean up what's contained in
every struct, and the final e_object_cleanup() will free the
structure itself. E_Delayed_Action is a good example.
- The only calls that influence the reference count are
e_object_ref() and e_object_unref(). If you need to do things
before an object gets destroyed, you can query the use count using
e_object_get_usecount() and check if it's equal to 1. So this:
OBJ_UNREF(b);
OBJ_IF_FREE(b)
{
ecore_window_reparent(e->win, 0, 0, 0);
e_icccm_release(e->win);
OBJ_FREE(b);
}
now is this:
if (e_object_get_usecount(E_OBJECT(b)) == 1)
{
ecore_window_reparent(e->win, 0, 0, 0);
e_icccm_release(e->win);
}
e_object_unref(E_OBJECT(b));
object.h and observer.h are completely commented, it shouldn't be
too hard to understand. This'll need to be documented in the manual
anyway.
* E_Objects are now used in lots of places where void* were used as
pointers to objects before, especially in the actions code. This is
obviously better, as it will generate compiler warnings when people
want to pass things to functions that expect E_Objects. This could
probably be more restrictive.
* Added typedefs for the function prototypes in E_Action_Impl. Those
fat signatures were just painful to read in the function
declarations/implementations.
* I've also tried to give parameters more useful names. Calling an
object "o" is a lot of fun when you want to grep for it.
* Included is also Graham's latest menu.c patch. Sorry for the
delay, Graham.
* I've added checks to the menu code that make sure that menus
don't pop up when they're empty (which resulted in a little useless
rectangle).
I guess that's it for now. Sorry if I broke anything, but this was
necessary imho.
SVN revision: 5605
2001-11-02 09:07:52 -08:00
|
|
|
|
2002-02-25 10:09:36 -08:00
|
|
|
update-gmo: Makefile $(GMOFILES)
|
|
|
|
@:
|
|
|
|
|
|
|
|
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
|
|
|
|
cd $(top_builddir) \
|
2001-08-23 09:40:23 -07:00
|
|
|
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
|
|
|
$(SHELL) ./config.status
|
|
|
|
|
|
|
|
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
|
|
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
|
|
|
.NOEXPORT:
|