2006-07-31 18:17:43 +04:00
|
|
|
# This makefile is here to simplify the automatic releases (and tests!!!)
|
|
|
|
# of the scripts
|
|
|
|
|
2006-08-01 00:13:25 +04:00
|
|
|
|
2006-07-31 18:17:43 +04:00
|
|
|
TS?=$(shell date '+%Y%m%d-%H%M')
|
2006-08-01 00:13:25 +04:00
|
|
|
DS?=$(shell date '+%Y%m%d')
|
|
|
|
|
|
|
|
### "MAIN" scripts are scripts that have a Philipp-like name, too
|
|
|
|
## That is for each script (listed below in MAIN_SCRIPTS),
|
|
|
|
## we create a date-stamped version in MAIN_SCRIPTS_TARGET_DIR
|
|
|
|
|
2006-08-01 01:01:07 +04:00
|
|
|
MAIN_SCRIPTS_TARGET_DIR=/export/ws06osmt/bin
|
|
|
|
# MAIN_SCRIPTS_TARGET_DIR=$(shell echo `pwd`/temp)
|
2006-08-01 00:13:25 +04:00
|
|
|
|
2006-08-01 01:01:07 +04:00
|
|
|
RELEASEDIR=/export/ws06osmt/bin/scripts-$(TS)
|
|
|
|
# RELEASEDIR=$(shell echo `pwd`/temp)
|
2006-07-31 18:17:43 +04:00
|
|
|
|
|
|
|
|
2006-08-01 00:13:25 +04:00
|
|
|
|
|
|
|
|
|
|
|
MAIN_TRAINING_SCRIPTS_NAMES=filter-model-given-input.pl mert-moses.pl train-factored-phrase-model.perl
|
2006-07-31 18:17:43 +04:00
|
|
|
# Make trick to add directory name to all of them:
|
2006-08-01 00:13:25 +04:00
|
|
|
MAIN_TRAINING_SCRIPTS=$(MAIN_TRAINING_SCRIPTS_NAMES:%=training/%)
|
2006-07-31 18:17:43 +04:00
|
|
|
|
|
|
|
# the list of all scripts that should be released
|
2006-08-01 00:13:25 +04:00
|
|
|
MAIN_SCRIPTS= $(MAIN_TRAINING_SCRIPTS)
|
2006-07-31 18:17:43 +04:00
|
|
|
|
|
|
|
release:
|
|
|
|
if [ -e $(RELEASEDIR) ]; then echo "Targetdir exists! Not touching it! $(RELEASEDIR)"; exit 1; fi
|
|
|
|
mkdir -p $(RELEASEDIR)
|
2006-08-01 00:13:25 +04:00
|
|
|
rsync -r --files-from ./released-files . $(RELEASEDIR)/
|
|
|
|
## Now adding JHU-specific stuff
|
|
|
|
mkdir -p $(RELEASEDIR)/extra/
|
|
|
|
cp -r /export/ws06osmt/bin/cmert-0.5 $(RELEASEDIR)/extra/
|
|
|
|
## And for each script, create/rewrite the daily release
|
|
|
|
for s in $(MAIN_SCRIPTS); do \
|
|
|
|
bn=`basename $$s`; \
|
|
|
|
echo "export SCRIPTS_ROOTDIR=$(RELEASEDIR); $(RELEASEDIR)/$$s" > $(MAIN_SCRIPTS_TARGET_DIR)/$$bn-$(DS) || exit 1; \
|
|
|
|
chmod 775 $(MAIN_SCRIPTS_TARGET_DIR)/$$bn-$(DS); \
|
|
|
|
done
|
|
|
|
## URGE yourself to:
|
|
|
|
@echo " export SCRIPTS_ROOTDIR=$(RELEASEDIR)"
|
|
|
|
## Release succeeded, tag the CVS
|
|
|
|
cvs tag SCRIPTS-RELEASE-$(TS)
|
|
|
|
|
|
|
|
|