Garrett Cooper | d025e1f | 2010-02-22 23:18:27 -0800 | [diff] [blame] | 1 | # |
| 2 | # Release Makefile for LTP. |
| 3 | # |
| 4 | # Copyright (C) 2010, Copyrights-are-for-losers, Inc. |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 2 of the License, or |
| 9 | # (at your option) any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License along |
| 17 | # with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | # |
| 20 | # Invoke like: |
| 21 | # |
| 22 | # make -f Makefile.release release TARBALL_VERSION=FOO |
| 23 | # |
| 24 | # Cheers. |
| 25 | # |
| 26 | |
| 27 | top_srcdir ?= $(CURDIR) |
| 28 | |
| 29 | include $(top_srcdir)/include/mk/env_pre.mk |
| 30 | include $(top_srcdir)/include/mk/automake.mk |
| 31 | |
| 32 | TARBALL_PREFIX ?= ltp |
| 33 | |
| 34 | ifneq ($(wildcard $(top_srcdir)/Version),) |
| 35 | TARBALL_VERSION ?= $(shell $(top_srcdir)/Version) |
| 36 | endif |
| 37 | |
| 38 | TARBALL_VERSION ?= $(error you must either make Version via make $$PWD/Version or specify an LTP version via TARBALL_VERSION) |
| 39 | |
| 40 | TARBALL := $(TARBALL_PREFIX)-$(TARBALL_VERSION).tgz |
| 41 | |
| 42 | clean: |
| 43 | $(MAKE) -f Makefile $@ |
| 44 | |
| 45 | release: | autotools distclean |
| 46 | tar -cvz --exclude "$(TARBALL)" -f $(TARBALL) * |