1) I was getting the problem only with 'make dist'. If I run only 'make'
both grep.pot and stamp-cat-id dependencies were ignored.

2) I found the problem. The dependencies specified 'grep.pot' and
'stamp-cat-id', but the targets were specified as './grep.pot' and
'./stamp-cat-id' (after variable substitution). It seems that using the
latest tools, 'grep.pot' and './grep.pot' are not equal, and that's why
make complained.

Solution: either remove '$(srcdir)/' from these two targets, or add
'$(srcdir)/' to all the dependencies where these targets are mentioned.

I find the first one simpler, and the second one redundant. A patch is
attached that removes the unnecessary '$(srcdir)/' from these two targets.

I am using autoconf-2.59_2 and automake-1.9.5 on FreeBSD 5.2.1-RELEASE.

Cheers,

TAA

--------------------------------------------------
Tony Abou-Assaleh
Ph.D. Candidate, Faculty of Computer Science
Dalhousie University, Halifax, NS, Canada, B3H 1W5
Fax:   902-492-1517
Email: [EMAIL PROTECTED]
WWW:   http://www.cs.dal.ca/~taa/
---------------------[THE END]--------------------


On Fri, 29 Apr 2005, Julian Foad wrote:

> Tony Abou-Assaleh wrote:
> > I am having difficulties with 'po/Makefile.in.in' when running
> > 'make dist'. Two problems to be exact:
> >
> > 1) make doesn't know how to make 'grep.pot'
> > 2) make doesn't know how to make 'stamp-cat-id'
> >
> > I can see that there are rules to handle each of the above situations
> > in the generated Makefile, but for some reason they're not working, and I
> > don't know enough about make to fix them.
>
> Here is the output of my "make" after I have deleted "grep.pot".  Maybe you 
> can
> see the problem by examining the corresponding output of your "make".  Maybe 
> it
> can't find "xgettext", in which case you should install the GNU "gettext" 
> package.
>
> ~/src/grep> make
> make  all-recursive
> make[1]: Entering directory `/home/julianfoad/src/grep'
> Making all in intl
> make[2]: Entering directory `/home/julianfoad/src/grep/intl'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/julianfoad/src/grep/intl'
> Making all in po
> make[2]: Entering directory `/home/julianfoad/src/grep/po'
> PATH=../src:$PATH /usr/bin/xgettext --default-domain=grep --directory=.. \
>    --add-comments --keyword=_ --keyword=N_ \
>    --files-from=./POTFILES.in \
> && test ! -f grep.po \
>     || ( rm -f ./grep.pot \
>          && mv grep.po ./grep.pot )
> rm -f cat-id-tbl.tmp
> sed -f ../intl/po2tbl.sed ./grep.pot \
> | sed -e "s/@PACKAGE NAME@/grep/" > cat-id-tbl.tmp
> sed: Couldn't open file ../intl/po2tbl.sed: No such file or directory
> if cmp -s cat-id-tbl.tmp ./cat-id-tbl.c; then \
>    rm cat-id-tbl.tmp; \
> else \
>    echo cat-id-tbl.c changed; \
>    rm -f ./cat-id-tbl.c; \
>    mv cat-id-tbl.tmp ./cat-id-tbl.c; \
> fi
> cd . && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
> make[2]: Leaving directory `/home/julianfoad/src/grep/po'
> Making all in lib
> make[2]: Entering directory `/home/julianfoad/src/grep/lib'
> Making all in posix
> [...]
>
> Note that something seems to be wrong here - it can't find 
> "../intl/po2tbl.sed"
> - but it does generate the two files you mentioned.  Claudio Fontana has a new
> build system ready; maybe it will take care of this.
>
>
> > My temporary solution is to remove dependency on stamp-cat-id and to copy
> > the old grep.pot from the cvs.
>
> That'll do for a nightly test release if you can't get it working fully, if
> people aren't working on translations (which nobody is, as far as I know).
>
> > The script, the hack in the shape of a patch, and the nightly CVS releases
> > are available at:
> >
> >     http://www.dal-acm.ca/~taa/grep/
>
> Great!  Thanks on behalf of those who need this.  You might want to announce
> this in a new thread.
>
> - Julian
>
Index: po/Makefile.in.in
===================================================================
RCS file: /cvsroot/grep/grep/po/Makefile.in.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in.in
--- po/Makefile.in.in   15 Mar 2002 10:40:17 -0000      1.3
+++ po/Makefile.in.in   30 Apr 2005 13:11:24 -0000
@@ -82,7 +82,7 @@
 all-yes: cat-id-tbl.c $(CATALOGS)
 all-no:
 
-$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+$(PACKAGE).pot: $(POTFILES)
        $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
          --add-comments --keyword=_ --keyword=N_ \
          --files-from=$(srcdir)/POTFILES.in \
@@ -91,7 +91,7 @@
                && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
 
 $(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
-$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+stamp-cat-id: $(PACKAGE).pot
        rm -f cat-id-tbl.tmp
        sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
                | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp

Reply via email to