-
Erwan Jahier authoredErwan Jahier authored
Makefile 2.76 KiB
OBJDIR=./obj$(HOSTTYPE)
LIC2CDIR=~/lic2loc
LUS2LICDIR=~/lus2lic
LUS2LIC=$(LUS2LICDIR)/$(OBJDIR)/lus2lic
WWW_DIR=/import/www/DIST-TOOLS/SYNCHRONE/lustre-v6
ifeq ($(HOSTTYPE),cygwin)
WWW_DIR=//ARPONT/www-verimag/DIST-TOOLS/SYNCHRONE/lustre-v6
endif
VERSION=R0.$(shell $(LUS2LIC) -version | cut -d " " -f 1 | cut -d "." -f 2)
RELNAME_PREFIX=lv6-alpha-$(VERSION)
RELNAME=$(RELNAME_PREFIX)-$(shell date +%d-%m-%y)-$(HOSTTYPE)
release: $(RELNAME) doc lus2lic test_files $(RELNAME).tgz
rel:release
xxx:
echo "RELNAME_PREFIX='$(RELNAME_PREFIX)'"
.PHONY: $(RELNAME)
$(RELNAME):
rm -rf $(RELNAME) || true
mkdir $(RELNAME) || true
cp -rf rel-skel/* $(RELNAME)/
doc:
cp $(LUS2LICDIR)/lv6-ref-man/lv6-ref-man.pdf $(RELNAME)/doc
cp ~/slides/lv6/*.pdf $(RELNAME)/doc
cp $(LUS2LICDIR)/utils/lustre.el $(RELNAME)/utils
lus2lic:
cd $(LUS2LICDIR)/ ; make nc
cp $(LUS2LIC) $(RELNAME)/bin/
lus2licbc:
cd $(LUS2LICDIR)/src ; make bc
cp $(LUS2LIC) $(RELNAME)/bin/
lic2c:
cd $(LIC2CDIR)/src/ ; make clean ; make
cp $(LIC2CDIR)/src/lic2c $(RELNAME)/bin/
test_files:
cp -rf $(LUS2LICDIR)/test/should_work $(RELNAME)/test/
cp -rf $(LUS2LICDIR)/test/should_fail $(RELNAME)/test/
cp -rf $(LUS2LICDIR)/test/lus2lic.tests $(RELNAME)/test/
cp -rf $(LUS2LICDIR)/test/Makefile.dist $(RELNAME)/test/Makefile
cp -rf $(LUS2LICDIR)/test/site.exp $(RELNAME)/test/
cp -rf $(LUS2LICDIR)/test/config $(RELNAME)/test/
rm -f $(RELNAME)/test/*/normal.lus
rm -f $(RELNAME)/test/*/*/normal.lus
rm -f $(RELNAME)/test/*/ELMU.lus
rm -f $(RELNAME)/test/*/*/ELMU.lus
rm -f $(RELNAME)/test/*/onlyroll*.lus
rm -f $(RELNAME)/test/*/*/onlyroll*.lus
rm -f $(RELNAME)/test/*/pilote-1.0.lus
rm -f $(RELNAME)/test/*/*/pilote-1.0.lus
rm -f $(RELNAME)/test/*/car*.lus
rm -f $(RELNAME)/test/*/*/car*.lus
rm -f $(RELNAME)/test/*/Gyro*.lus
rm -f $(RELNAME)/test/*/*/Gyro*.lus
for f in $(shell find $(LUS2LICDIR)/src/test/should_work -name \*.lus); do \
($(RELNAME)/bin/lus2lic $$f -o /tmp/xx.lus || (echo "*** lus2lic $$f failed" ; exit 1)) && \
echo "cp $$f $(RELNAME)/test/" && \
cp $$f $(RELNAME)/test/; \
done
# ($(RELNAME)/bin/lic2c --out-format loc /tmp/xx.lus > /dev/null || (echo "*** lic2c $$f failed" ; exit 1)) &&
$(RELNAME).tgz:
tar cvfz $(RELNAME).tgz $(RELNAME)
www: $(RELNAME).tgz
cp $(RELNAME).tgz $(WWW_DIR)
cp $(LUS2LICDIR)/lv6-ref-man/lv6-ref-man.pdf $(WWW_DIR)/doc/
verimag:
cp $(RELNAME).tgz /usr/local/tools/lustre-v6
cd /usr/local/tools/lustre-v6 ; tar xvfz $(RELNAME).tgz
rm /usr/local/tools/lustre-v6/current
ln -s /usr/local/tools/lustre-v6/$(RELNAME) /usr/local/tools/lustre-v6/current
clean:
rm -rf $(RELNAME_PREFIX)*-*
test-rel:
cp $(RELNAME).tgz /tmp && \
cd /tmp && \
rm -rf $(RELNAME) && \
tar xvfz $(RELNAME).tgz && \
cd $(RELNAME)/test && make test
all: rel