https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git
Revision 4bb535ff4bf76b86e5aeb4d1758750f31e306b16 authored by weis on 23 January 2007, 15:50:04 UTC, committed by weis on 23 January 2007, 15:50:04 UTC
1 parent d6abd49
Raw File
Tip revision: 4bb535ff4bf76b86e5aeb4d1758750f31e306b16 authored by weis on 23 January 2007, 15:50:04 UTC
Banners.
Tip revision: 4bb535f
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.7 2007-01-23 15:50:04 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)

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 = 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 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 announce tag 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 co $(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

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

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