0

Maybe I am asking a silly question, but is there any way I can tell automake to put my project include files when I do a "make dist" but not when I do a "make install"?

Maybe I am not acting the right way, so to make it clearer I will tell what I need.

  1. I need to deploy my applications in an embedded board and I use "make install" in a script to create a package that can be copied to the target board.

  2. On the other side, I'd like to be able to update my toolchain with my libraries and include files.

In the first situation, I can't have any fat wasting my limited flash memory but just the necessary things to make the application to run.

In the second one, I need to have headers, pkgconfig and all of the stuff needed for development.

How I am supposed to configure my "Makefile.am" and which rules to expect so that I can reach my goals?

Really thanks.

4

2 回答 2

2

我只是希望能够设置给定的脚本 SUID、其他数据文件 R/W 任意权限等等。

我认为添加 $(DESTDIR) 的 makefile 用户变量可以做到这一点。由于它不是由 automake 定义的,“make install”使用它为空,但 dpkg-buildpackage 用“make dist”目标定义它。

(见:http ://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR )

它帮助我管理 setuid 安装:

配置.ac

# Add option to disable setuid during install, use in distcheck
AC_ARG_ENABLE(setuid-install, 
 AS_HELP_STRING(
 [--disable-setuid-install       do not set setuid flags during install]), 
 [enable_setuid_install=$enableval], [enable_setuid_install="yes"])
AM_CONDITIONAL(SETUID_INSTALL, test x"$enable_setuid_install" = "xyes")

生成文件.am

if SETUID_INSTALL
install-data-hook:
        /bin/chmod 4755 $(DESTDIR)$(bindir)myBinary
endif
于 2014-02-25T13:51:52.600 回答
0

我不认为autoconf它真的被设计成一个通用的安装程序/卸载程序,它会给你那种控制而至少没有一些痛苦。您正在寻找类似dpkg-buildpackagerpmbuild可以将输出拆分make install为特定子包的地方,以便您可以拥有:

  • foo用于嵌入式板和可能的工具链,具体取决于包中的内容(DSO、可执行文件和运行时所需的其他文件)
  • 为工具链打包foo-devfoo-devel(头文件、静态库、开发所需的其他文件)。
于 2012-07-10T01:09:42.570 回答