diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-18 09:37:44 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-22 09:14:04 -0500 |
commit | 487109b910b07c3a2260a6daa234af051d34cd52 (patch) | |
tree | 2d2b54d0a66f253420c137d3d9d09ea971a062c0 /Makefile.am | |
parent | 796b784bcdce3154d204bfac0a88f92fbe66d2df (diff) | |
download | sssd_unused-487109b910b07c3a2260a6daa234af051d34cd52.tar.gz sssd_unused-487109b910b07c3a2260a6daa234af051d34cd52.tar.xz sssd_unused-487109b910b07c3a2260a6daa234af051d34cd52.zip |
Add 'prerelease-srpms' target to Makefile
This target is available only if building from a git checkout.
It will automatically populate the PRERELEASE_VERSION in
version.m4 with the current datestamp and git commit id for
creating an SRPM.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 8801d08c..b0f8959f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,6 +36,14 @@ srpms: dist-gzip rpmroot --define _source_filedigest_algorithm=1 \ -bs SPECS/sssd.spec +if GIT_CHECKOUT +prerelease-srpms: + cp $(srcdir)/version.m4 $(srcdir)/version.m4.orig + sed -e "s/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.*\])/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.`date +%Y%m%d`git`git log -1 --pretty=format:%h`\])/" < $(srcdir)/version.m4.orig > $(srcdir)/version.m4 + $(MAKE) srpms + mv $(srcdir)/version.m4.orig $(srcdir)/version.m4 +endif + tests: all for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir $@; \ |