blob: db3785de142b4ef36c6a4480c75942ff81bd78f1 [file] [log] [blame]
Garrett Cooperd025e1f2010-02-22 23:18:27 -08001#
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
27top_srcdir ?= $(CURDIR)
28
29include $(top_srcdir)/include/mk/env_pre.mk
30include $(top_srcdir)/include/mk/automake.mk
31
32TARBALL_PREFIX ?= ltp
33
34ifneq ($(wildcard $(top_srcdir)/Version),)
35TARBALL_VERSION ?= $(shell $(top_srcdir)/Version)
36endif
37
38TARBALL_VERSION ?= $(error you must either make Version via make $$PWD/Version or specify an LTP version via TARBALL_VERSION)
39
40TARBALL := $(TARBALL_PREFIX)-$(TARBALL_VERSION).tgz
41
42clean:
43 $(MAKE) -f Makefile $@
44
45release: | autotools distclean
46 tar -cvz --exclude "$(TARBALL)" -f $(TARBALL) *