https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git
Raw File
Tip revision: ad58ae426e7e9200530d18bf439d02657503426c authored by fclement on 23 November 2010, 11:33 UTC
Ignore all generated files.
Tip revision: ad58ae4
Makefile.distrib
#######################################################################
#                                                                     #
#                          OCamlP3l                                   #
#                                                                     #
# (C) 2004-2007                                                       #
#             Roberto Di Cosmo (dicosmo@dicosmo.org)                  #
#             Zheng Li (zli@lip6.fr)                                  #
#             Pierre Weis (Pierre.Weis@inria.fr)                      #
#             Francois Clement (Francois.Clement@inria.fr)            #
#                                                                     #
# Based on original Ocaml P3L System                                  #
# (C) 1997 by                                                         #
#             Roberto Di Cosmo (dicosmo@ens.fr)                       #
#             Marco Danelutto (marcod@di.unipi.it)                    #
#             Xavier Leroy  (Xavier.Leroy@inria.fr)                   #
#             Susanna Pelagatti (susanna@di.unipi.it)                 #
#                                                                     #
# This program is free software; you can redistribute it and/or       #
# modify it under the terms of the GNU Library General Public License #
# as published by the Free Software Foundation; either version 2      #
# of the License, or (at your option) any later version.              #
#                                                                     #
# This program is distributed in the hope that it will be useful,     #
# but WITHOUT ANY WARRANTY; without even the implied warranty of      #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       #
# GNU Library General Public License for more details.                #
#                                                                     #
#######################################################################

# $Id: Makefile.distrib,v 1.17 2007-01-24 14:34:18 weis 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)
FTPSITEDIR2 = /net/pauillac/infosystems/ftp/cristal/caml-light/bazar-ocaml/$(PACKAGE)

YEAR = 2007
OLDYEAR = 2006
MAINVERSION = 2
SUBVERSION = 03
PATCHLEVEL = 0
VERSION = $(MAINVERSION).$(SUBVERSION)
FULLVERSION = $(VERSION)
OLDVERSION = 2.02

PACKAGEFULLNAME = $(PACKAGE)-$(FULLVERSION)

CVSRELEASETAG = $(PACKAGE)-$(MAINVERSION)_$(SUBVERSION)_$(PATCHLEVEL)
ANNOUNCEFILE = Announce-$(FULLVERSION)

#PACKAGEVERSIONFILES = Source/version.ml
#DOCVERSIONFILES = doc_src/Includes/env

MANFILES =

.PHONY: fake distribute package website ftp ftp2 tag retag untag announce version \
	documentation release

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 ftp2 tag announce #version

package: clean-all all documentation release

clean-all::
	cd doc_src; $(MAKE) $@
	$(RM) doc release

documentation:
	# Make documentation and test before release
	cd doc_src; $(MAKE) all
	# Build a clean documentation directory for distribution
	cd doc_src; $(MAKE) docdir

release:
	# Then clean the old stuff
	$(RM) release
	$(MKDIR) release
	# And check out a brand new version,
	# clean it
	# copy the documentation in it
	cd release; $(CVS) -d "`cat ../CVS/Root`" co -P $(PACKAGEROOT); \
	  find . -name CVS | xargs $(RM); \
	  find . -name "*cvsignore*" | xargs $(RM); \
	  find . -name "banner*" | xargs $(RM); \
	  find . -name ".depend*" | xargs $(RM); \
	  find . -name Makefile.distrib | xargs $(RM); \
	  $(RM) $(PACKAGEROOT)/doc_src; \
	  $(CP) ../doc $(PACKAGEROOT)

website:
	# Build the Web site
	$(RM) $(WEBSITEDIR).new
	$(MKDIR) $(WEBSITEDIR).new
	$(CP) release/$(PACKAGEROOT)/doc/* $(WEBSITEDIR).new;
	$(CHGRP) caml $(WEBSITEDIR).new
	$(CHMOD) ug+w $(WEBSITEDIR).new
	$(MV) $(WEBSITEDIR) $(WEBSITEDIR).old
	$(MV) $(WEBSITEDIR).new $(WEBSITEDIR)
	$(RM) $(WEBSITEDIR).old
	$(RM) doc

ftp:
	# Build the FTP site
	# Copy the legalease to $(FTPSITEDIR)
	$(MKDIR) $(FTPSITEDIR)
	$(CP) release/$(PACKAGEROOT)/README $(FTPSITEDIR)
	$(CP) release/$(PACKAGEROOT)/COPYING $(FTPSITEDIR)
	$(CP) release/$(PACKAGEROOT)/LICENSE $(FTPSITEDIR)
	# Give the release its versionning name
	cd release; mv $(PACKAGEROOT) bazar-ocaml/$(PACKAGEFULLNAME); \
	# Build the archive and move it in the proper ftp site
	cd release/bazar-ocaml; \
	  $(TARC) $(PACKAGEFULLNAME).tgz $(PACKAGEFULLNAME); \
	  $(MV) $(PACKAGEFULLNAME).tgz $(FTPSITEDIR)
	$(CP) $(FTPSITEDIR)/$(PACKAGEFULLNAME).tgz $(WEBSITEDIR)/
	$(RM) release

ftp2:
	# Build the FTP2 site
	# Copy the FTP site to $(FTPSITEDIR2)
	$(MKDIR) $(FTPSITEDIR2)
	$(CP) $(FTPSITEDIR)/* $(FTPSITEDIR2)/

tag:
	$(CVS) rtag -R $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)

retag:
	$(CVS) rtag -R -F $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)

untag:
	$(RM) ./release
	$(CVS) rtag -R -d $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)

announce:
	mail -n -s "New release of $(PACKAGE)" \
                caml-announce@inria.fr < $(ANNOUNCEFILE)

# 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
back to top