【问题标题】:How does Makefile.in.in get changed to Makefile when using intltool?使用 intltool 时如何将 Makefile.in.in 更改为 Makefile?
【发布时间】:2015-01-24 04:12:39
【问题描述】:

我有一个尝试国际化的 GTK 项目。我需要帮助了解如何将 intltool 包中的 po/Makefile.in.in 转换为 Makefile.in 然后转换为 Makefile 的基本工作流程。

我的直接问题是 Makefile.in 与 Makefile.in.in 相同。我得到了很多错误,例如未定义@SHELL@,显然是因为宏/变量没有被替换,以及@srcdir@ 和@topdir@ 等许多其他错误。如果我删除 Makefile.in,则没有从 Makefile.in.in 中创建它的规则。

我更大的问题是我不清楚在这种情况下整个工具链如何生成 Makefile。我在整个项目目录的其余部分都使用 aclocal/autoconf/configure,但是添加国际化的东西让我陷入了循环。感谢您的帮助。

【问题讨论】:

    标签: makefile configure autotools autoconf


    【解决方案1】:

    我想我找到了自己问题的答案。以下链接有所帮助:

    https://www.mail-archive.com/gtkmm-list@gnome.org/msg13483.html

    主要是我不得不改变

    AC_CONFIG_FILES(po/Makefile)
    

    AC_CONFIG_FILES(po/Makefile.in)
    

    并使用该站点上建议的 autogen.sh 脚本,而不是我正在使用的脚本,即:

    #!/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..."
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-23
      • 2019-02-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-21
      • 1970-01-01
      • 2015-02-17
      相关资源
      最近更新 更多