Modifying CFLAGS for 'make distcheck'
Hi all, I am a big fan of 'make distcheck' and also a fan of compiling with gcc's -Werrror flag. Most of my configure.ac scripts also have a --enable-gcc-werror options so that I can use -Werror while developing but ship tarballs without it. So now I had this great idea. Wouldn't it be great if I could tell 'make distcheck' use './configure --enable-gcc-werror'! Anyone have a clue on how to do this? Cheers, Erik -- - Erik de Castro Lopo - Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin. - John Von Neumann (1951)
Re: Modifying CFLAGS for 'make distcheck'
Hello Ericm * Erik de Castro Lopo wrote on Sat, Feb 09, 2008 at 09:47:06AM CET: So now I had this great idea. Wouldn't it be great if I could tell 'make distcheck' use './configure --enable-gcc-werror'! Use DISTCHECK_CONFIGURE_FLAGS. Cheers, Ralf
Re: Modifying CFLAGS for 'make distcheck'
On Sat, 2008-02-09 at 19:47 +1100, Erik de Castro Lopo wrote: Hi all, I am a big fan of 'make distcheck' and also a fan of compiling with gcc's -Werrror flag. Most of my configure.ac scripts also have a --enable-gcc-werror options so that I can use -Werror while developing but ship tarballs without it. So now I had this great idea. Wouldn't it be great if I could tell 'make distcheck' use './configure --enable-gcc-werror'! Anyone have a clue on how to do this? DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror in your top-level Makefile.am. -- Braden McDaniel e-mail: [EMAIL PROTECTED] http://endoframe.comJabber: [EMAIL PROTECTED]
Re: Modifying CFLAGS for 'make distcheck'
Braden McDaniel wrote: Anyone have a clue on how to do this? DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror in your top-level Makefile.am. Wow, that is a very beautiful thing. Thanks Braden! Cheers, Erik -- - Erik de Castro Lopo - This is like creating laws against blasphemy and then complaining that unbelievers can't come up with any logical argument against the existence of God -- www.infoanarchy.org on the Digital Millenium Copyright Act
Re: Modifying CFLAGS for 'make distcheck'
On Sat, 9 Feb 2008, Erik de Castro Lopo wrote: So now I had this great idea. Wouldn't it be great if I could tell 'make distcheck' use './configure --enable-gcc-werror'! Anyone have a clue on how to do this? While this can certainly be done (as explained in subsequent email), you might want to think twice about it. Many people consider open source development to be a profoundly personal experience and make distcheck to be a personal experience but for packages using an open license, it may be that someone else will want to perform make distcheck on your package and a benign warning originating from some system header file or due to a minor typing difference will prevent it from succeeding. I think that make distcheck should be for testing the distribution integrity. Packages which use free licenses like GPL should be lenient about minor things in order to avoid arbitrarily limiting the free exercise of the license. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: Modifying CFLAGS for 'make distcheck'
On Sat, 9 Feb 2008, Ralf Wildenhues wrote: OTOH, Erik could also put this in his Makefile.am: my-distcheck: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_CONFIGURE_FLAGS=--enable-gcc-werror That seems much better from an overall package portability standpoint. Which is one reason I'm hesitating to enable the option dist-lzma for the Automake package itself. I assumed that if dist-lzma was requested that if the lzma tools were not available that the request would simply be ignored. Is that not the case? Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: Modifying CFLAGS for 'make distcheck'
Hi Bob, * Bob Friesenhahn wrote on Sat, Feb 09, 2008 at 05:11:29PM CET: On Sat, 9 Feb 2008, Erik de Castro Lopo wrote: So now I had this great idea. Wouldn't it be great if I could tell 'make distcheck' use './configure --enable-gcc-werror'! Anyone have a clue on how to do this? While this can certainly be done (as explained in subsequent email), you might want to think twice about it. But using it, and hard-coding it in Makefile.am are two different things. Even then, you, the user of Erik's package, can make distcheck DISTCHECK_CONFIGURE_FLAGS= OTOH, Erik could also put this in his Makefile.am: my-distcheck: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_CONFIGURE_FLAGS=--enable-gcc-werror I think that make distcheck should be for testing the distribution integrity. Packages which use free licenses like GPL should be lenient about minor things in order to avoid arbitrarily limiting the free exercise of the license. Which is one reason I'm hesitating to enable the option dist-lzma for the Automake package itself. Cheers, Ralf
Re: Modifying CFLAGS for 'make distcheck'
* Bob Friesenhahn wrote on Sat, Feb 09, 2008 at 05:58:01PM CET: On Sat, 9 Feb 2008, Ralf Wildenhues wrote: Which is one reason I'm hesitating to enable the option dist-lzma for the Automake package itself. I assumed that if dist-lzma was requested that if the lzma tools were not available that the request would simply be ignored. Is that not the case? No. Without the Automake option `dist-lzma' enabled, a rule named `dist-lzma' exists, but there is nothing depending on it, and lzma is not used in the `dist' rule. If the Automake option `dist-lzma' is enabled, the `dist' rule (and thus also the `distcheck' rule) will require successful lzma tarball creation. The rationale here is of course: if the package maintainer is actually doing the distribution, then heck, it should fail if the needed files aren't built. This is perfectly symmetric with dist-bzip2 and all the other dist-foo options Automake has. Cheers, Ralf
Re: ACLOCAL_AMFLAGS problems
Hello Ruben, Apologies for the delay, I must have missed this somehow: http://thread.gmane.org/gmane.comp.sysutils.automake.general/8983 * Ruben Henner Zilibowitz wrote on Tue, Dec 18, 2007 at 01:59:44PM CET: I have run into a problem where the following line: ACLOCAL_AMFLAGS = -I m4 in the top level Makefile.am causes make dist to fail. Eg: Ruben-Henner-Zilibowitzs-iMac:hello rhz$ make dist { test ! -d hello-0.1 || { find hello-0.1 -type d ! -perm -200 -exec chmod u+w {} ';' rm -fr hello-0.1; }; } test -d hello-0.1 || mkdir hello-0.1 /bin/sh: hello-0.1/Bunga: No such file or directory cp: hello-0.1/m4/am_prog_mkdir_p.m4: No such file or directory make: *** [distdir] Error 1 Removing ACLOCAL_AMFLAGS = -I m4 solves the problem, but I have another project which needs this for autoconf to work correctly, so I can't remove it, so make dist always fails there. If anyone can help explain what might be going wrong exactly here, I'd really appreciate it. I don't yet see what's going on, could you make the package available somehow, or a small subset of it that reproduces the failure? Which Automake version do you use? Cheers, Ralf
Re: Modifying CFLAGS for 'make distcheck'
On Sat, 9 Feb 2008, Ralf Wildenhues wrote: If the Automake option `dist-lzma' is enabled, the `dist' rule (and thus also the `distcheck' rule) will require successful lzma tarball creation. The rationale here is of course: if the package maintainer is actually doing the distribution, then heck, it should fail if the needed files aren't built. Thanks for the clarification. To be 100% correct, each of the created dist files should be verified to see that its content passes the distcheck tests. Of course that would take a long time. Since the lzma tools are still very new, my level of confidence is not very high yet (not that I have found any cause for concern) but I assume that confidence will grow over time. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: Modifying CFLAGS for 'make distcheck'
* Bob Friesenhahn wrote on Sat, Feb 09, 2008 at 07:34:31PM CET: Thanks for the clarification. To be 100% correct, each of the created dist files should be verified to see that its content passes the distcheck tests. If *that* were still a concern for a compression tool (as opposed to various vendor `tar' programs), then heck it should not be promoted at all for wider use. No, I don't think each package using Automake should be turned into a regression test suite for lzma. That's more fear, uncertainty, and doubt, than I'm willing to handle ATM. And if your fears turn out to have a basis after all, then the step to go is to remove dist-lzma and think about it again in a couple of years. Cheers, Ralf
Re: Modifying CFLAGS for 'make distcheck'
On Sat, 9 Feb 2008, Ralf Wildenhues wrote: If *that* were still a concern for a compression tool (as opposed to various vendor `tar' programs), then heck it should not be promoted at all for wider use. No, I don't think each package using Automake should be turned into a regression test suite for lzma. That's more fear, Most of the compressors offer an option to test the compressed file. For lzma, gunzip, and bunzip2, that is provided by the -t option, and for zip, it is the -T option. It is probably not a bad idea to at least verify that the same tool thinks that the package can be properly decompressed. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/