[Ovirt-devel] [PATCH node] Restructured makefile and rpmbuilding to simplify it

Jim Meyering jim at meyering.net
Fri Sep 19 12:16:15 UTC 2008

Perry Myers <pmyers at redhat.com> wrote:
> Removed customized rpm macros that should really be set by users
> ~/.rpmmacros directory.  This removed need for custom tar target,
> as we can now use dist and rpmbuild -ta instead.
> Still need to have custom RPM_FLAGS for ovirt specific overrides
> like OVIRT_CACHE_DIR (used by appliance and node-image spec files)
> Removed unused bumprelease, bumpversion and setversion targets
> Removed other unused make variables
> Simplified publish to just rsync all RPMS frpm the rpmdir.
> Added seconds granularity to git tag for bumpgit target.
> Made it so version file is no longer edited by makefile.
> Instead configure.ac file is used to store version.  For
> developers setting OVIRT_DEV env var causes extra_dist to be
> passed to rpmbuild adding the git tag onto the RPM.

Very nice indeed.  One nit:

> diff --git a/configure.ac b/configure.ac
> index c7a274f..6a36910 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,4 @@
> -# note: the version number here is overridden by the one in release.mk
> -AC_INIT([ovirt-node], [0.1], [ovirt-devel at redhat.com])
> +AC_INIT([ovirt-node], [0.92], [ovirt-devel at redhat.com])
>  AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
>  AC_CONFIG_HEADERS([config.h])
> @@ -14,4 +13,4 @@ test x"$ac_ct_CC:$CFLAGS" = 'xgcc:-g -O2' \
>    && CFLAGS="$CFLAGS -Wshadow -Wall -Werror"
>  AC_CONFIG_FILES([Makefile ovirt-identify-node/Makefile ovirt-listen-awake/Makefile])
> +AC_OUTPUT(ovirt-node.spec)

It's slightly better to keep all config.status-generated files in the
AC_CONFIG_FILES list.  Actually it's even better to remove non-Makefile
names like ovirt-node.spec altogether, and instead generate them via a
rule in Makefile.am.  "info autoconf" explains why, but here it's not
worth doing, because if VERSION changes, you have to rerun autoconf
in any case.


More information about the ovirt-devel mailing list