39 lines
838 B
Makefile
39 lines
838 B
Makefile
|
# This makefile allows build tarball distribution for utt.
|
||
|
|
||
|
#
|
||
|
# Some variables
|
||
|
#
|
||
|
|
||
|
# Directory with utt binaries
|
||
|
ifndef _UTT_DIST_DIR
|
||
|
_UTT_DIST_DIR=${DIR}
|
||
|
endif
|
||
|
|
||
|
# Where put result
|
||
|
ifndef _UTT_DIST_OUTPUT
|
||
|
_UTT_DIST_OUTPUT=${DIR}
|
||
|
endif
|
||
|
|
||
|
# Common info about version and release
|
||
|
_UTT_VER=$(shell cat ../common/version.def)
|
||
|
_UTT_REL=$(shell cat ../common/release.def)
|
||
|
|
||
|
# Temp vars
|
||
|
DIR=$(shell pwd)
|
||
|
_TARBALL_ROOT=$(DIR)/utt_$(_UTT_VER)-$(_UTT_REL)
|
||
|
_TAR_FILE_NAME=utt.$(_UTT_VER)_$(_UTT_REL).tar.gz
|
||
|
|
||
|
#defualt task
|
||
|
.PHONY: default
|
||
|
default:
|
||
|
@echo Build dir is ${_UTT_DIST_DIR}
|
||
|
@echo Change output for tarball as ${_UTT_DIST_OUTPUT}
|
||
|
mkdir -p ${_TARBALL_ROOT}
|
||
|
cp -fr ${_UTT_DIST_DIR}/* ${_TARBALL_ROOT}
|
||
|
@# we add some extra files
|
||
|
cp ./INSTALL ${_TARBALL_ROOT}/
|
||
|
|
||
|
tar -czf ${_UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt*
|
||
|
|
||
|
rm -rf ${_TARBALL_ROOT}
|