MAP
MAP

Reputation: 79

How does Makefile.in.in get changed to Makefile when using intltool?

I have a GTK project I'm trying to internationalize. I need help understanding the basic work-flow of how po/Makefile.in.in from the intltool package gets converted to Makefile.in and then to Makefile.

My immediate problem is that Makefile.in is the same as Makefile.in.in. I get many make errors like @SHELL@ is not defined, apparently because somewhere along the line that macro/variable was not replaced, along with many others like @srcdir@ and @topdir@. If I delete Makefile.in, there is no rule to create it from Makefile.in.in.

My bigger problem is that I'm fuzzy on how the whole tool-chain works to generate the Makefile in this case. I'm getting by with aclocal/autoconf/configure throughout the rest of the project directories, but adding the internationalized stuff is throwing me for a loop. Thanks for any help.

Upvotes: 1

Views: 647

Answers (1)

MAP
MAP

Reputation: 79

I think I found the answer to my own question. The following link helped:

https://www.mail-archive.com/[email protected]/msg13483.html

Mainly, I had to change

AC_CONFIG_FILES(po/Makefile)

to

AC_CONFIG_FILES(po/Makefile.in)

and use the autogen.sh script suggested on that site instead of the one I was using, namely:

#!/bin/sh

mkdir -p m4

echo "Creating m4/aclocal.m4 ..."
test -r m4/aclocal.m4 || touch m4/aclocal.m4

echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy

echo "Making m4/aclocal.m4 writable ..."
test -r m4/aclocal.m4 && chmod u+w m4/aclocal.m4

echo "Running intltoolize..."
intltoolize --force --copy --automake || return 1

echo "Running aclocal..."
aclocal || return 1

echo "Running libtoolize..."
libtoolize || return 1

echo "Running autoheader..."
autoheader || return 1

echo "Running autoconf..."
autoconf || return 1

echo "Running automake..."
automake --add-missing || return 1

echo "You should now run ./configure..."

Upvotes: 2

Related Questions