[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CONFIG_FILES and chmod
From: |
Ralf Wildenhues |
Subject: |
Re: AC_CONFIG_FILES and chmod |
Date: |
Tue, 16 Jun 2009 20:01:30 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-15) |
* William Pursell wrote on Tue, Jun 16, 2009 at 06:27:39PM CEST:
> Lorenzo Bettini wrote:
> > 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 can do:
>
> m4_esyscmd([for f in foo bar;
> do echo "AC_CONFIG_FILES([$f],[chmod +x $f])"; done])
>
> Eric, is that safe?
That may be safe, I haven't checked, but in any case it is very ugly.
Please do not use m4_esyscmd unless it cannot be helped at all, it's
an ugly crutch and will only lead to problems.
You can use
m4_foreach_w([my_file], [autoconf autoheader ...],
[AC_CONFIG_FILES([my_file], [chmod +x my_file])])
to have less to type. Note the expanded configure script doesn't grow
all that huge either, it adds at most a couple of lines per file.
Cheers,
Ralf