autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_CONFIG_FILES and chmod


From: Eric Blake
Subject: Re: AC_CONFIG_FILES and chmod
Date: Tue, 16 Jun 2009 06:26:38 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Lorenzo Bettini on 6/13/2009 2:05 AM:
> On configure.ac, if you need to set the executable flag of a file
> generated by configure, you can do like this (as reported in the manual):
> 
> AC_CONFIG_FILES([Makefile src/Makefile man/Makefile X/Imakefile])
> AC_CONFIG_FILES([autoconf], [chmod +x autoconf])
> 
> Now, since I have many generated files to set as executable, is there a
> quicker way than to have an AC_CONFIG_FILES([...], [chmod +x ...])
> instruction for each file?

You could use AC_CONFIG_COMMANDS and create a single tag that performs the
chmod for all such files in a single process.  This is similar to the
AC_CONFIG_COMMANDS tag created by automake for computing compilation
dependencies all in one step.  However, there is no way to associate that
tag with the tag for each file, and also remember that config.status can
instantiate just one rather than every tag.  Thus, if the user builds just
one file, they would have to independently also request the tag that runs
the bulk chmod command.  So it may be safest after all to just keep with
the current usage of one chmod command per file that needs it, even though
that ends up with more typing in configure.ac and more processes during
config.status.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko3j34ACgkQ84KuGfSFAYDFxgCcDWZEfOD6U8+s8QRON4Ox2lUP
EnUAoKp2KP0WLkridy/B7K2SDwcIyX5p
=F+3a
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]