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-05-08 11:48:30 +02:00
|
|
|
@# config files
|
|
|
|
mkdir -p ${_TARBALL_ROOT}/cnf
|
|
|
|
mv ${_TARBALL_ROOT}/etc/utt/*.conf ${_TARBALL_ROOT}/cnf/
|
|
|
|
${DIR}/prepare_conf.sh ${_TARBALL_ROOT}/cnf ${_TARBALL_ROOT}/etc/utt
|
|
|
|
rm -rf ${_TARBALL_ROOT}/cnf
|
2008-03-11 14:02:41 +01:00
|
|
|
cp ./INSTALL ${_TARBALL_ROOT}/
|
2008-05-08 11:48:30 +02:00
|
|
|
cp ./Makefile.tarball ${_TARBALL_ROOT}/Makefile
|
2008-03-17 11:35:12 +01:00
|
|
|
cp ../files/* ${_TARBALL_ROOT}/
|
2008-03-11 14:02:41 +01:00
|
|
|
|
2008-05-08 11:48:30 +02: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
|
|
|
|