Changeset 178:3d0c37cee462 in mediastreamer2


Ignore:
Timestamp:
Nov 26, 2008 12:11:54 PM (5 years ago)
Author:
smorlat <smorlat@…>
Branch:
default
Message:

fix several memory leaks.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@181 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

Location:
linphone
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • linphone/autogen.sh

    r0 r178  
    1414set -x 
    1515libtoolize --copy --force 
     16intltoolize -c --force --automake 
    1617autoheader 
    1718$ACLOCAL -I m4 
  • linphone/coreapi/exevents.c

    r158 r178  
    578578                        profile */ 
    579579                        rtppayload=payload_type_clone(rtppayload); 
     580                        if (rtp_profile_get_payload(dialog_profile,payload->pt)!=NULL){ 
     581                                ms_error("Payload %s type already entered, should not happen !",rtppayload->mime_type); 
     582                        } 
    580583                        rtp_profile_set_payload(dialog_profile,payload->pt,rtppayload); 
    581584                        /* add to the rtp payload type some other parameters (bandwidth) */ 
     
    627630 
    628631        params=&call->audio_params; 
    629         if (call->profile==NULL){ 
    630                 /* create a remote user agent profile */ 
    631                 call->profile=remote_profile=rtp_profile_new("remote"); 
    632         } 
    633632        remote_profile=call->profile; 
    634633        /* see if this codec is supported in our local rtp profile*/ 
     
    683682        if (!linphone_core_video_enabled(lc)) return -1; 
    684683 
    685         if (call->profile==NULL){ 
    686                 /* create a remote user agent profile */ 
    687                 call->profile=rtp_profile_new("remote"); 
    688         } 
    689684        params=&call->video_params; 
    690685        remote_profile=call->profile; 
  • linphone/coreapi/linphonecore.c

    r177 r178  
    8282        if (linphone_core_get_firewall_policy(call->core)==LINPHONE_POLICY_USE_STUN)  
    8383                linphone_core_run_stun_tests(call->core,call); 
     84        call->profile=rtp_profile_new("Call RTP profile"); 
    8485} 
    8586 
     
    12111212        if (!lc->sip_conf.sdp_200_ack){ 
    12121213                ctx=lc->call->sdpctx; 
    1213                 lc->call->profile=rtp_profile_clone_full(lc->local_profile); 
    12141214                sdpmesg=sdp_context_get_offer(ctx); 
    12151215                linphone_set_sdp(invite,sdpmesg); 
     
    13471347        lc->audiostream=audio_stream_new(linphone_core_get_audio_port(lc),linphone_core_ipv6_enabled(lc)); 
    13481348#ifdef VIDEO_ENABLED 
    1349         lc->videostream=video_stream_new(linphone_core_get_video_port(lc),linphone_core_ipv6_enabled(lc)); 
     1349        if (lc->video_conf.display || lc->video_conf.capture) 
     1350                lc->videostream=video_stream_new(linphone_core_get_video_port(lc),linphone_core_ipv6_enabled(lc)); 
    13501351#else 
    1351   lc->videostream=NULL; 
     1352        lc->videostream=NULL; 
    13521353#endif 
    13531354} 
     
    15031504                return -1; 
    15041505        } 
    1505         ms_message("eXosip_call_build_answer done"); 
    15061506        /*if a sdp answer is computed, send it, else send an offer */ 
    15071507        sdpmesg=call->sdpctx->answerstr; 
    15081508        if (sdpmesg==NULL){ 
    15091509                offering=TRUE; 
    1510                 call->profile=rtp_profile_clone_full(lc->local_profile); 
    15111510                ms_message("generating sdp offer"); 
    15121511                sdpmesg=sdp_context_get_offer(call->sdpctx); 
  • linphone/po/Makefile.in.in

    r0 r178  
    1 # Makefile for PO directory in any package using GNU gettext. 
    2 # Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 
    3 # 
    4 # This file can be copied and used freely without restrictions.  It can 
    5 # be used in projects which are not available under the GNU General Public 
    6 # License but which still want to provide support for the GNU gettext 
    7 # functionality. 
    8 # Please note that the actual code of GNU gettext is covered by the GNU 
    9 # General Public License and is *not* in the public domain. 
    10 # 
    11 # Origin: gettext-0.16 
    12  
     1# Makefile for program source directory in GNU NLS utilities package. 
     2# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 
     3# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com> 
     4# 
     5# This file may be copied and used freely without restrictions.  It may 
     6# be used in projects which are not available under a GNU Public License, 
     7# but which still want to provide support for the GNU gettext functionality. 
     8# 
     9# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE 
     10#   instead of PACKAGE and to look for po2tbl in ./ not in intl/ 
     11# 
     12# - Modified by jacob berkman <jacob@ximian.com> to install 
     13#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize 
     14# 
     15# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool 
     16# 
     17# We have the following line for use by intltoolize: 
     18# INTLTOOL_MAKEFILE 
     19 
     20GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 
    1321PACKAGE = @PACKAGE@ 
    1422VERSION = @VERSION@ 
    15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 
    1623 
    1724SHELL = /bin/sh 
    18 @SET_MAKE@ 
    1925 
    2026srcdir = @srcdir@ 
    2127top_srcdir = @top_srcdir@ 
     28top_builddir = @top_builddir@ 
    2229VPATH = @srcdir@ 
    2330 
    2431prefix = @prefix@ 
    2532exec_prefix = @exec_prefix@ 
     33datadir = @datadir@ 
    2634datarootdir = @datarootdir@ 
    27 datadir = @datadir@ 
    28 localedir = @localedir@ 
    29 gettextsrcdir = $(datadir)/gettext/po 
     35libdir = @libdir@ 
     36DATADIRNAME = @DATADIRNAME@ 
     37itlocaledir = $(prefix)/$(DATADIRNAME)/locale 
     38subdir = po 
     39install_sh = @install_sh@ 
     40# Automake >= 1.8 provides @mkdir_p@. 
     41# Until it can be supposed, use the safe fallback: 
     42mkdir_p = $(install_sh) -d 
    3043 
    3144INSTALL = @INSTALL@ 
    3245INSTALL_DATA = @INSTALL_DATA@ 
    3346 
    34 # We use $(mkdir_p). 
    35 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as 
    36 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, 
    37 # @install_sh@ does not start with $(SHELL), so we add it. 
    38 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined 
    39 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake 
    40 # versions, $(mkinstalldirs) and $(install_sh) are unused. 
    41 mkinstalldirs = $(SHELL) @install_sh@ -d 
    42 install_sh = $(SHELL) @install_sh@ 
    43 MKDIR_P = @MKDIR_P@ 
    44 mkdir_p = @mkdir_p@ 
    45  
    46 GMSGFMT_ = @GMSGFMT@ 
    47 GMSGFMT_no = @GMSGFMT@ 
    48 GMSGFMT_yes = @GMSGFMT_015@ 
    49 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) 
    50 MSGFMT_ = @MSGFMT@ 
    51 MSGFMT_no = @MSGFMT@ 
    52 MSGFMT_yes = @MSGFMT_015@ 
    53 MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) 
    54 XGETTEXT_ = @XGETTEXT@ 
    55 XGETTEXT_no = @XGETTEXT@ 
    56 XGETTEXT_yes = @XGETTEXT_015@ 
    57 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) 
    58 MSGMERGE = msgmerge 
    59 MSGMERGE_UPDATE = @MSGMERGE@ --update 
    60 MSGINIT = msginit 
    61 MSGCONV = msgconv 
    62 MSGFILTER = msgfilter 
    63  
    64 POFILES = @POFILES@ 
    65 GMOFILES = @GMOFILES@ 
    66 UPDATEPOFILES = @UPDATEPOFILES@ 
    67 DUMMYPOFILES = @DUMMYPOFILES@ 
    68 DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 
    69 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 
    70 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ 
    71 $(POFILES) $(GMOFILES) \ 
    72 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 
     47GMSGFMT = @GMSGFMT@ 
     48MSGFMT = @MSGFMT@ 
     49XGETTEXT = @XGETTEXT@ 
     50INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 
     51INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 
     52MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist 
     53GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot 
     54 
     55ALL_LINGUAS = @ALL_LINGUAS@ 
     56 
     57PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) 
     58 
     59USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi) 
     60 
     61USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) 
     62 
     63POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) 
     64 
     65DISTFILES = Makefile.in.in POTFILES.in $(POFILES) 
     66EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS 
    7367 
    7468POTFILES = \ 
    75  
    76 CATALOGS = @CATALOGS@ 
    77  
    78 # Makevars gets inserted here. (Don't remove this line!) 
     69# This comment gets stripped out 
     70 
     71CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) 
    7972 
    8073.SUFFIXES: 
    81 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update 
     74.SUFFIXES: .po .pox .gmo .mo .msg .cat 
     75 
     76.po.pox: 
     77        $(MAKE) $(GETTEXT_PACKAGE).pot 
     78        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox 
    8279 
    8380.po.mo: 
    84         @echo "$(MSGFMT) -c -o $@ $<"; \ 
    85         $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ 
     81        $(MSGFMT) -o $@ $< 
    8682 
    8783.po.gmo: 
    88         @lang=`echo $* | sed -e 's,.*/,,'`; \ 
    89         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 
    90         echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ 
    91         cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo 
    92  
    93 .sin.sed: 
    94         sed -e '/^#/d' $< > t-$@ 
    95         mv t-$@ $@ 
     84        file=`echo $* | sed 's,.*/,,'`.gmo \ 
     85          && rm -f $$file && $(GMSGFMT) -o $$file $< 
     86 
     87.po.cat: 
     88        sed -f ../intl/po2msg.sed < $< > $*.msg \ 
     89          && rm -f $@ && gencat $@ $*.msg 
    9690 
    9791 
    9892all: all-@USE_NLS@ 
    9993 
    100 all-yes: stamp-po 
     94all-yes: $(CATALOGS) 
    10195all-no: 
    10296 
    103 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no 
    104 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because 
    105 # we don't want to bother translators with empty POT files). We assume that 
    106 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. 
    107 # In this case, stamp-po is a nop (i.e. a phony target). 
    108  
    109 # stamp-po is a timestamp denoting the last time at which the CATALOGS have 
    110 # been loosely updated. Its purpose is that when a developer or translator 
    111 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, 
    112 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent 
    113 # invocations of "make" will do nothing. This timestamp would not be necessary 
    114 # if updating the $(CATALOGS) would always touch them; however, the rule for 
    115 # $(POFILES) has been designed to not touch files that don't need to be 
    116 # changed. 
    117 stamp-po: $(srcdir)/$(DOMAIN).pot 
    118         test ! -f $(srcdir)/$(DOMAIN).pot || \ 
    119           test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 
    120         @test ! -f $(srcdir)/$(DOMAIN).pot || { \ 
    121           echo "touch stamp-po" && \ 
    122           echo timestamp > stamp-poT && \ 
    123           mv stamp-poT stamp-po; \ 
    124         } 
    125  
    126 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 
    127 # otherwise packages like GCC can not be built if only parts of the source 
    128 # have been downloaded. 
    129  
    130 # This target rebuilds $(DOMAIN).pot; it is an expensive operation. 
    131 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 
    132 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 
    133         if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ 
    134           msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ 
    135         else \ 
    136           msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ 
    137         fi; \ 
    138         $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 
    139           --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ 
    140           --files-from=$(srcdir)/POTFILES.in \ 
    141           --copyright-holder='$(COPYRIGHT_HOLDER)' \ 
    142           --msgid-bugs-address="$$msgid_bugs_address" 
    143         test ! -f $(DOMAIN).po || { \ 
    144           if test -f $(srcdir)/$(DOMAIN).pot; then \ 
    145             sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 
    146             sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ 
    147             if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ 
    148               rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ 
    149             else \ 
    150               rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ 
    151               mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 
    152             fi; \ 
    153           else \ 
    154             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 
    155           fi; \ 
    156         } 
    157  
    158 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at 
    159 # every "make" invocation, only create it when it is missing. 
    160 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. 
    161 $(srcdir)/$(DOMAIN).pot: 
    162         $(MAKE) $(DOMAIN).pot-update 
    163  
    164 # This target rebuilds a PO file if $(DOMAIN).pot has changed. 
    165 # Note that a PO file is not touched if it doesn't need to be changed. 
    166 $(POFILES): $(srcdir)/$(DOMAIN).pot 
    167         @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 
    168         if test -f "$(srcdir)/$${lang}.po"; then \ 
    169           test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 
    170           echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ 
    171           cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ 
    172         else \ 
    173           $(MAKE) $${lang}.po-create; \ 
    174         fi 
    175  
    176  
    177 install: install-exec install-data 
    178 install-exec: 
     97$(GETTEXT_PACKAGE).pot: $(POTFILES) 
     98        $(GENPOT) 
     99 
     100install: install-data 
    179101install-data: install-data-@USE_NLS@ 
    180         if test "$(PACKAGE)" = "gettext-tools"; then \ 
    181           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ 
    182           for file in $(DISTFILES.common) Makevars.template; do \ 
    183             $(INSTALL_DATA) $(srcdir)/$$file \ 
    184                             $(DESTDIR)$(gettextsrcdir)/$$file; \ 
    185           done; \ 
    186           for file in Makevars; do \ 
    187             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 
    188           done; \ 
    189         else \ 
    190           : ; \ 
    191         fi 
    192102install-data-no: all 
    193103install-data-yes: all 
    194         $(mkdir_p) $(DESTDIR)$(datadir) 
    195         @catalogs='$(CATALOGS)'; \ 
    196         for cat in $$catalogs; do \ 
    197           cat=`basename $$cat`; \ 
    198           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 
    199           dir=$(localedir)/$$lang/LC_MESSAGES; \ 
    200           $(mkdir_p) $(DESTDIR)$$dir; \ 
    201           if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ 
    202           $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ 
    203           echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ 
    204           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 
    205             if test -n "$$lc"; then \ 
    206               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 
    207                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 
    208                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 
    209                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    210                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 
    211                  for file in *; do \ 
    212                    if test -f $$file; then \ 
    213                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 
    214                    fi; \ 
    215                  done); \ 
    216                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 
    217               else \ 
    218                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 
    219                   :; \ 
    220                 else \ 
    221                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    222                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    223                 fi; \ 
    224               fi; \ 
    225               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 
    226               ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 
    227               ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 
    228               cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 
    229               echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ 
     104        linguas="$(USE_LINGUAS)"; \ 
     105        for lang in $$linguas; do \ 
     106          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ 
     107          $(mkdir_p) $$dir; \ 
     108          if test -r $$lang.gmo; then \ 
     109            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 
     110            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ 
     111          else \ 
     112            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 
     113            echo "installing $(srcdir)/$$lang.gmo as" \ 
     114                 "$$dir/$(GETTEXT_PACKAGE).mo"; \ 
     115          fi; \ 
     116          if test -r $$lang.gmo.m; then \ 
     117            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ 
     118            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ 
     119          else \ 
     120            if test -r $(srcdir)/$$lang.gmo.m ; then \ 
     121              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ 
     122                $$dir/$(GETTEXT_PACKAGE).mo.m; \ 
     123              echo "installing $(srcdir)/$$lang.gmo.m as" \ 
     124                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ 
     125            else \ 
     126              true; \ 
    230127            fi; \ 
    231           done; \ 
    232         done 
    233  
    234 install-strip: install 
    235  
    236 installdirs: installdirs-exec installdirs-data 
    237 installdirs-exec: 
    238 installdirs-data: installdirs-data-@USE_NLS@ 
    239         if test "$(PACKAGE)" = "gettext-tools"; then \ 
    240           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ 
    241         else \ 
    242           : ; \ 
     128          fi; \ 
     129        done 
     130 
     131# Empty stubs to satisfy archaic automake needs 
     132dvi info tags TAGS ID: 
     133 
     134# Define this as empty until I found a useful application. 
     135install-exec installcheck: 
     136 
     137uninstall: 
     138        linguas="$(USE_LINGUAS)"; \ 
     139        for lang in $$linguas; do \ 
     140          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ 
     141          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ 
     142        done 
     143 
     144check: all $(GETTEXT_PACKAGE).pot 
     145        rm -f missing notexist 
     146        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m 
     147        if [ -r missing -o -r notexist ]; then \ 
     148          exit 1; \ 
    243149        fi 
    244 installdirs-data-no: 
    245 installdirs-data-yes: 
    246         $(mkdir_p) $(DESTDIR)$(datadir) 
    247         @catalogs='$(CATALOGS)'; \ 
    248         for cat in $$catalogs; do \ 
    249           cat=`basename $$cat`; \ 
    250           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 
    251           dir=$(localedir)/$$lang/LC_MESSAGES; \ 
    252           $(mkdir_p) $(DESTDIR)$$dir; \ 
    253           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 
    254             if test -n "$$lc"; then \ 
    255               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 
    256                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 
    257                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 
    258                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    259                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 
    260                  for file in *; do \ 
    261                    if test -f $$file; then \ 
    262                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 
    263                    fi; \ 
    264                  done); \ 
    265                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 
    266               else \ 
    267                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 
    268                   :; \ 
    269                 else \ 
    270                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    271                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 
    272                 fi; \ 
    273               fi; \ 
    274             fi; \ 
    275           done; \ 
    276         done 
    277  
    278 # Define this as empty until I found a useful application. 
    279 installcheck: 
    280  
    281 uninstall: uninstall-exec uninstall-data 
    282 uninstall-exec: 
    283 uninstall-data: uninstall-data-@USE_NLS@ 
    284         if test "$(PACKAGE)" = "gettext-tools"; then \ 
    285           for file in $(DISTFILES.common) Makevars.template; do \ 
    286             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 
    287           done; \ 
    288         else \ 
    289           : ; \ 
    290         fi 
    291 uninstall-data-no: 
    292 uninstall-data-yes: 
    293         catalogs='$(CATALOGS)'; \ 
    294         for cat in $$catalogs; do \ 
    295           cat=`basename $$cat`; \ 
    296           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 
    297           for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ 
    298             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 
    299           done; \ 
    300         done 
    301  
    302 check: all 
    303  
    304 info dvi ps pdf html tags TAGS ctags CTAGS ID: 
    305150 
    306151mostlyclean: 
    307         rm -f remove-potcdate.sed 
    308         rm -f stamp-poT 
    309         rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po 
    310         rm -fr *.o 
     152        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp 
     153        rm -f .intltool-merge-cache 
    311154 
    312155clean: mostlyclean 
    313156 
    314157distclean: clean 
    315         rm -f Makefile Makefile.in POTFILES *.mo 
     158        rm -f Makefile Makefile.in POTFILES stamp-it 
     159        rm -f *.mo *.msg *.cat *.cat.m *.gmo 
    316160 
    317161maintainer-clean: distclean 
    318162        @echo "This command is intended for maintainers to use;" 
    319163        @echo "it deletes files that may require special tools to rebuild." 
    320         rm -f stamp-po $(GMOFILES) 
    321  
    322 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 
    323 dist distdir: 
    324         $(MAKE) update-po 
    325         @$(MAKE) dist2 
    326 # This is a separate target because 'update-po' must be executed before. 
    327 dist2: stamp-po $(DISTFILES) 
     164        rm -f Makefile.in.in 
     165 
     166distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 
     167dist distdir: $(DISTFILES) 
    328168        dists="$(DISTFILES)"; \ 
    329         if test "$(PACKAGE)" = "gettext-tools"; then \ 
    330           dists="$$dists Makevars.template"; \ 
    331         fi; \ 
    332         if test -f $(srcdir)/$(DOMAIN).pot; then \ 
    333           dists="$$dists $(DOMAIN).pot stamp-po"; \ 
    334         fi; \ 
    335         if test -f $(srcdir)/ChangeLog; then \ 
    336           dists="$$dists ChangeLog"; \ 
    337         fi; \ 
    338         for i in 0 1 2 3 4 5 6 7 8 9; do \ 
    339           if test -f $(srcdir)/ChangeLog.$$i; then \ 
    340             dists="$$dists ChangeLog.$$i"; \ 
     169        extra_dists="$(EXTRA_DISTFILES)"; \ 
     170        for file in $$extra_dists; do \ 
     171          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ 
     172        done; \ 
     173        for file in $$dists; do \ 
     174          test -f $$file || file="$(srcdir)/$$file"; \ 
     175          ln $$file $(distdir) 2> /dev/null \ 
     176            || cp -p $$file $(distdir); \ 
     177        done 
     178 
     179update-po: Makefile 
     180        $(MAKE) $(GETTEXT_PACKAGE).pot 
     181        tmpdir=`pwd`; \ 
     182        linguas="$(USE_LINGUAS)"; \ 
     183        for lang in $$linguas; do \ 
     184          echo "$$lang:"; \ 
     185          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ 
     186          if $$result; then \ 
     187            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 
     188              rm -f $$tmpdir/$$lang.new.po; \ 
     189            else \ 
     190              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 
     191                :; \ 
     192              else \ 
     193                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 
     194                rm -f $$tmpdir/$$lang.new.po; \ 
     195                exit 1; \ 
     196              fi; \ 
     197            fi; \ 
     198          else \ 
     199            echo "msgmerge for $$lang.gmo failed!"; \ 
     200            rm -f $$tmpdir/$$lang.new.po; \ 
    341201          fi; \ 
    342         done; \ 
    343         if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ 
    344         for file in $$dists; do \ 
    345           if test -f $$file; then \ 
    346             cp -p $$file $(distdir) || exit 1; \ 
    347           else \ 
    348             cp -p $(srcdir)/$$file $(distdir) || exit 1; \ 
    349           fi; \ 
    350         done 
    351  
    352 update-po: Makefile 
    353         $(MAKE) $(DOMAIN).pot-update 
    354         test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 
    355         $(MAKE) update-gmo 
    356  
    357 # General rule for creating PO files. 
    358  
    359 .nop.po-create: 
    360         @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ 
    361         echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ 
    362         exit 1 
    363  
    364 # General rule for updating PO files. 
    365  
    366 .nop.po-update: 
    367         @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ 
    368         if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ 
    369         tmpdir=`pwd`; \ 
    370         echo "$$lang:"; \ 
    371         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 
    372         echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ 
    373         cd $(srcdir); \ 
    374         if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ 
    375           if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 
    376             rm -f $$tmpdir/$$lang.new.po; \ 
    377           else \ 
    378             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 
    379               :; \ 
    380             else \ 
    381               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 
    382               exit 1; \ 
    383             fi; \ 
    384           fi; \ 
    385         else \ 
    386           echo "msgmerge for $$lang.po failed!" 1>&2; \ 
    387           rm -f $$tmpdir/$$lang.new.po; \ 
     202        done 
     203 
     204Makefile POTFILES: stamp-it 
     205        @if test ! -f $@; then \ 
     206          rm -f stamp-it; \ 
     207          $(MAKE) stamp-it; \ 
    388208        fi 
    389209 
    390 $(DUMMYPOFILES): 
    391  
    392 update-gmo: Makefile $(GMOFILES) 
    393         @: 
    394  
    395 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 
     210stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in 
    396211        cd $(top_builddir) \ 
    397           && $(SHELL) ./config.status $(subdir)/$@.in po-directories 
    398  
    399 force: 
     212          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ 
     213               $(SHELL) ./config.status 
    400214 
    401215# Tell versions [3.59,3.63) of GNU make not to export all variables. 
Note: See TracChangeset for help on using the changeset viewer.