2008-03-11 14:02:41 +01:00
|
|
|
# This makefile allows build tarball distribution for utt.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Some variables
|
|
|
|
#
|
|
|
|
|
2008-03-17 11:35:12 +01:00
|
|
|
DIR=$(shell pwd)
|
|
|
|
|
2008-03-11 14:02:41 +01:00
|
|
|
# Directory with utt binaries
|
2008-03-17 11:35:12 +01:00
|
|
|
ifndef UTT_DIST_DIR
|
|
|
|
UTT_DIST_DIR=${DIR}
|
2008-03-11 14:02:41 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Where put result
|
2008-03-17 11:35:12 +01:00
|
|
|
ifndef UTT_DIST_OUTPUT
|
|
|
|
UTT_DIST_OUTPUT=${DIR}
|
2008-03-11 14:02:41 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Common info about version and release
|
|
|
|
_UTT_VER=$(shell cat ../common/version.def)
|
|
|
|
_UTT_REL=$(shell cat ../common/release.def)
|
|
|
|
|
|
|
|
# Temp vars
|
2008-03-17 11:35:12 +01:00
|
|
|
_TARBALL_ROOT=$(DIR)/utt-$(_UTT_VER).$(_UTT_REL)
|
2008-03-11 14:02:41 +01:00
|
|
|
_TAR_FILE_NAME=utt.$(_UTT_VER)_$(_UTT_REL).tar.gz
|
|
|
|
|
|
|
|
#defualt task
|
|
|
|
.PHONY: default
|
|
|
|
default:
|
2008-03-17 11:35:12 +01:00
|
|
|
@echo Build directory: ${UTT_DIST_DIR}
|
|
|
|
@echo Output directory for tarball: ${UTT_DIST_OUTPUT}
|
2008-03-11 14:02:41 +01:00
|
|
|
mkdir -p ${_TARBALL_ROOT}
|
2008-03-17 11:35:12 +01:00
|
|
|
cp -fr ${UTT_DIST_DIR}/* ${_TARBALL_ROOT}
|
2008-03-11 14:02:41 +01:00
|
|
|
@# we add some extra files
|
2008-03-17 11:35:12 +01:00
|
|
|
cp ../common/utt_make_config.pl ${_TARBALL_ROOT}/bin/
|
|
|
|
chmod 755 ${_TARBALL_ROOT}/bin/utt_make_config.pl
|
2008-03-11 14:02:41 +01:00
|
|
|
cp ./INSTALL ${_TARBALL_ROOT}/
|
2008-03-17 11:35:12 +01:00
|
|
|
cp ../files/* ${_TARBALL_ROOT}/
|
2008-03-11 14:02:41 +01:00
|
|
|
|
2008-03-17 11:35:12 +01:00
|
|
|
tar -czf ${UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt*
|
2008-03-11 14:02:41 +01:00
|
|
|
|
|
|
|
rm -rf ${_TARBALL_ROOT}
|
2008-03-17 11:35:12 +01:00
|
|
|
|