#*********************************************************************#
# #
# Active-DVI #
# #
# Projet Cristal, INRIA Rocquencourt #
# #
# Copyright 2002-2004, #
# Institut National de Recherche en Informatique et en Automatique. #
# All rights reserved. This file is distributed under the terms of #
# the GNU Lesser General Public License. #
# #
# Jun Furuse, Didier Rémy and Pierre Weis. #
# Contributions by Roberto Di Cosmo, Didier Le Botlan, #
# Xavier Leroy, and Alan Schmitt. #
# #
# Based on Mldvi by Alexandre Miquel. #
#*********************************************************************#
# $Id: Makefile.distrib,v 1.2 2007-01-22 18:26:18 fclement Exp $
# Just for $(PACKAGE) maintainers, distribution of the software.
# Usage:
# make -f Makefile.distrib distribute
# Need an INSTALL and README file in the main directory.
# Need a doc directory where the documentation has been written,
# presumably in HTML with an index.html file. This directory is copied
# onto the WEB site directory of the package, as mentioned in
# $(WEBSITEDIR). Presumably the doc directory contains 2 files named
# eng.htm and fra.htm that respectively contain the English and French
# documentation.
# A tar ball file with the source files is also constructed and moved
# into the $(FTPDIR) directory.
PACKAGEROOT = bazar-ocaml/$(PACKAGE)
WEBSITEDIR = /net/yquem/infosystems/www/bazaar/$(PACKAGE)
FTPSITEDIR = /net/yquem/infosystems/ftp/bazaar/$(PACKAGE)
YEAR = 2007
OLDYEAR = 2006
MAINVERSION = 2
SUBVERSION = 03
PATCHLEVEL = 0
VERSION = $(MAINVERSION).$(SUBVERSION)
FULLVERSION = $(VERSION).$(PATCHLEVEL)
OLDVERSION = 2.02
PACKAGEFULLNAME = $(PACKAGE)-$(FULLVERSION)
CVSRELEASETAG = $(PACKAGE)-$(MAINVERSION)_$(SUBVERSION)_$(PATCHLEVEL)
ANNOUNCEFILE = Announce-$(FULLVERSION)
PACKAGEVERSIONFILES = Source/version.ml
DOCVERSIONFILES = tex/ocamlp3l.sty tex/ocamlp3l.hva \
doc_src/Includes/ocamlp3l-version.html doc_src/Includes/env \
doc_src/ocamlp3l.man
MANFILES = doc/ocamlp3l.1
HELPFILES = doc/splash.dvi \
doc/scratch_write_splash.dvi doc/scratch_draw_splash.dvi
.PHONY: fake distribute package website ftp announce tag untag version \
documentation
fake:
@echo
@echo 'This Makefile is used to distribute the software.'
@echo 'Read it to understand how to use it!'
@echo
distribute: package website ftp announce tag version
package: clean-all all documentation
documentation:
# Make documentation and test before release
cd doc_src; $(MAKE) all
# Build a clean documentation directory for distribution
cd doc_src; $(MAKE) docdir
# Then clean the old stuff
$(RM) release
$(MKDIR) release
# And check out a brand new version,
# clean it
# copy the documentation in it
# then copy the images
cd release; cvs co $(PACKAGEROOT); \
$(CP) ../doc $(PACKAGEROOT)/; \
$(RM) $(PACKAGEROOT)/Makefile.distrib; \
find . -name '.cvsignore' -print | xargs $(RM); \
find . -name 'CVS' -print | xargs $(RM); \
website:
# Build the Web site
$(RM) $(WEBSITEDIR)/*
- $(MKDIR) $(WEBSITEDIR)
$(CP) release/$(PACKAGEROOT)/doc/* $(WEBSITEDIR)/;
- chgrp -R caml $(WEBSITEDIR)
- chmod -R ug+w $(WEBSITEDIR)
$(LN) $(WEBSITEDIR)/eng.htm $(WEBSITEDIR)/index.html
ftp:
# Build the FTP site
# Copy the legalease to $(FTPSITEDIR)
$(MKDIR) $(FTPSITEDIR)
$(CP) release/$(PACKAGEROOT)/LGPL \
release/$(PACKAGEROOT)/README \
release/$(PACKAGEROOT)/INDEX $(FTPSITEDIR)
# Give the release its versioning name
cd release; mv $(PACKAGEROOT) bazar-ocaml/$(PACKAGEFULLNAME); \
# Build the archive and move it in the proper ftp site
cd release/bazar-ocaml; \
tar zcvf $(PACKAGEFULLNAME).tgz $(PACKAGEFULLNAME); \
$(MV) $(PACKAGEFULLNAME).tgz $(FTPSITEDIR)
$(RM) release
announce:
mail -n -s "New release of $(PACKAGE)" \
caml-announce@inria.fr < $(ANNOUNCEFILE)
tag:
cvs rtag -R $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)
untag:
$(RM) ./release
cvs rtag -R -d $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)
# Automatic handling of versionning
version:
for i in $(PACKAGEVERSIONFILES) $(DOCVERSIONFILES); do \
echo $$i; \
$(MV) $$i $$i~; \
sed -e '/ersion/s/$(OLDVERSION)/$(VERSION)/' $$i~ | \
sed -e '/year/s/$(OLDYEAR)/$(YEAR)/' > $$i; \
done
include makefile