0
votes

I'm new to the automake tools. When I issue 'make install', I want files to change their group name and not the default group of the installer (user). I have a install-exec-hook rule at my root Makefile.am that says: chgrp -R $(GROUP) *

The problem is, I want the user to define GROUP, and if they do not, use the user's default group. I've been trying to use AC_DEFINE, AC_SUBST and other options and can't find anything to work.

1

1 Answers

0
votes

This worked for me. In configure.ac, I added:

test -z "$GROUP" && GROUP=$USER

AC_SUBST(GROUP_NAME, $GROUP)

and in Makefile.am, I added:

install-exec-hook:

chgrp -R @GROUP_NAME@ ${exec_prefix}

Now to specify the groupname, the user can do ./configure GROUP=GROUPNAME_TO_USE