Some questionable choices in generated autotools files
@mcatanzaro
Submitted by Michael Catanzaro Link to original bug (#770045)
Description
I created a new project using the GNOME application project template. Builder made configure.ac and Makefile.am files for me that look mostly nice.
The autoconf file is a bit verbose, but it all looks mostly useful. A few exceptions:
-
Adding -I m4 to ACLOCAL_AMFLAGS is deprecated, won't work in Automake 2.0, and is redundant because the configure.ac generated by Builder already calls AC_CONFIG_MACRO_DIR([m4]). The only purpose of this line is to shut up a libtool warning, but libtool is wrong here. I would remove this line. See the Automake NEWS file for details (I'd copy it here... but can't).
-
AC_CANONICAL_HOST is used, but $host is not used anywhere. I think this line is just making the configure script slower.
-
AC_PROG_INSTALL is used, but $INSTALL is not used anywhere.
-
PKG_PROG_PKG_CONFIG is used, but PKG_CHECK_MODULES is called unconditionally. PKG_PROG_PKG_CONFIG is intended to be used when the first call to PKG_CHECK_MODULES is inside a conditional.
-
The checks for GLIB_GENMARSHAL, GLIB_MKENUMS, GLIB_COMPILE_RESOURCES, GLIB_GSETTINGS, GOBJECT_INTROSPECTION_CHECK, and VAPIGEN_CHECK are all unused. If these are just intended as examples, maybe they should be commented out?
-
Libtool isn't used. Is Builder able to add libtool convenience libraries to projects? If so, it'd be better to wait until the first such library is created to add libtool crap.
Lastly, in the toplevel Makefile.am, there is a GITIGNOREFILES that contains a bunch of files that looks like a misuse of git.mk. GITIGNOREFILES is rarely the right thing to use; almost all of the files listed here should be cleaned by MAINTAINERCLEANFILES instead. You're supposed to add the three git.mk variables GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL, GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN, and GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL to MAINTAINERCLEANFILES instead. *.o files should already be cleaned by Automake automatically (surely?) and *.swp files should be ignored in a global .gitignore rather than added to project-specific .gitignores if you use an editor that creates *.swp files (which I believe Builder does not?).