Reputation: 3716
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.
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.
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.
Upvotes: 0
Views: 516
Reputation: 49
I just want to be able to set a given script SUID, other data files R/W arbitrary permissions and so on.
I think adding the $(DESTDIR) 's makefile user variable do that. As it is not define by automake, "make install" use it empty, but dpkg-buildpackage define it with the "make dist" target.
(see: http://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR)
It help me to manage setuid install:
configure.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")
Makefile.am:
if SETUID_INSTALL
install-data-hook:
/bin/chmod 4755 $(DESTDIR)$(bindir)myBinary
endif
Upvotes: 2
Reputation: 16305
I don't think autoconf
was really designed to be a generic installer/uninstaller that'll give you that kind of control without at least some pain. You're looking for something like dpkg-buildpackage
or rpmbuild
where you can split up the output of make install
into specific subpackages so you can have:
Upvotes: 0