Commit 18314bff authored by pj2m's avatar pj2m

grew* migration

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@6314 7838e531-6607-4d57-9587-6c381814729c
parents
name = "libgrew_dev"
description = "Libgrew"
version = "@VERSION@"
requires = ""
archive(byte) = "libgrew.cma"
archive(native) = "libgrew.cmxa"
all:
@make -C src libgrew.cmxa
@make -C src libgrew.cma
include config/Makefile
conf:
cd config && aclocal
autoconf -o configure config/configure.in
purge_makefile:
@make -C src purge_makefile
@make purge
@make -C config purge
clean:
@make -C src clean
@make cleanup
uninstall:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
ocamlfind remove libgrew > /dev/null
uninstall_dev:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
ocamlfind remove libgrew_dev > /dev/null
LIB_DEP = libgrew.cma libgrew.cmxa libgrew.a libgrew.cmi
install: uninstall
cp META META_
sed -itmp "s|@VERSION@|$(VERSION)|g" META
rm -rf METAtmp
ifneq ($(DESTDIR),)
mkdir -p $(DESTDIR)$(OCAMLFIND_DIR)
touch $(DESTDIR)$(OCAMLFIND_DIR)/for_mac_libgrew
endif
mkdir -p $(DESTDIR)$(DATA_DIR)/
cp data/style.css $(DESTDIR)$(DATA_DIR)/
cd src && ocamlfind install libgrew ../META $(LIB_DEP)
mv META_ META
install_dev: uninstall_dev
cp META META_
sed -itmp "s|@VERSION@|$(VERSION)|g" META
sed -itmp "s|@DEV@|_dev|g" META
rm -rf METAtmp
cd src && ocamlfind install libgrew_dev ../META $(LIB_DEP)
mv META_ META
cp data/style.css $(DESTDIR)$(DATA_DIR)/
.PHONY: doc
doc:
@make -C src doc
################################################################################
################## PACKAGING ###################################################
################################################################################
targz: clean conf purge_makefile
rm -rf libcaml-grew-$(VERSION)
mkdir -p libcaml-grew-$(VERSION)
cp -r config libcaml-grew-$(VERSION)/
cp configure libcaml-grew-$(VERSION)/
cp Makefile.in libcaml-grew-$(VERSION)/
cp META libcaml-grew-$(VERSION)/
cp -r src libcaml-grew-$(VERSION)/
cp -r data libcaml-grew-$(VERSION)/
cd libcaml-grew-$(VERSION)/ && find . -name .svn -print0 | xargs -0 rm -rf
cd libcaml-grew-$(VERSION)/ && find . -name autom4te.cache -print0 | xargs -0 rm -rf
tar -czvf packaging/libcaml-grew-$(VERSION).tar.gz libcaml-grew-$(VERSION)
rm -rf libcaml-grew-$(VERSION)
portfile: targz
cd packaging && sh create_portfile.sh $(VERSION)
pack_deb: targz
sh packaging/make_deb.sh $(VERSION) $(INSTALL_DIR) $(DATA_DIR) $(DOC_DIR)
LOG_DIR = @LOG_INCLUDE@
LOG_BYTE = $(LOG_DIR) log.cma
LOG_OPT = $(LOG_DIR) log.cmxa
DEP2PICT_DIR = @DEP2PICT_INCLUDE@
DEP2PICT_BYTE = $(DEP2PICT_DIR) dep2pict.cma
DEP2PICT_OPT = $(DEP2PICT_DIR) dep2pict.cmxa
ANSITERMINAL_DIR = @ANSITERMINAL_INCLUDE@
ANSITERMINAL_BYTE = $(ANSITERMINAL_DIR) ANSITerminal.cma
ANSITERMINAL_OPT = $(ANSITERMINAL_DIR) ANSITerminal.cmxa
INSTALL_DIR_LIB = @OCAMLLIB@
INSTALL_DIR = @prefix@/bin/
DATA_DIR = @prefix@@datarootdir@/libgrew/
DOC_DIR = @prefix@@datarootdir@/libgrew-doc/
BYTE_FLAGS = -g -dtypes
OPT_FLAGS = -g -dtypes
DEBUG = @DEBUG@
WARNING = @WARNING@
MESSAGE = @MESSAGE@
INFO = @INFO@
OCAMLFIND_DIR=`ocamlfind printconf destdir`
VERSION = 0.9.1
cleanup:
rm -rf *.cmo *.cmx *.cmi *.annot *.o *.*~
purge:
rm -rf Makefile
infos:
@echo ""
@echo "version -> " $(VERSION)
@echo ""
@echo "prefix -> " @prefix@
@echo "exec install dir -> " $(INSTALL_DIR)
@echo "lib install dir -> " $(INSTALL_DIR_LIB)
@echo "data install dir -> " $(DATA_DIR)
@echo "doc install dir -> " $(DOC_DIR)
@echo ""
@echo "log -> " $(LOG_OPT)
@echo "dep2pict -> " $(DEP2PICT_OPT)
@echo "ansiterminal -> " $(ANSITERMINAL_OPT)
@echo ""
@echo "byte compil flags -> " $(BYTE_FLAGS)
@echo "native compil flags -> " $(OPT_FLAGS)
@echo ""
@echo "DEBUG -> " $(DEBUG)
@echo "WARNING -> " $(WARNING)
@echo "MESSAGE -> " $(MESSAGE)
@echo "INFO -> " $(INFO)
@echo ""
AC_PREREQ([2.63])
AC_INIT(grew, 1.0, paul.masson@inria.fr)
echo ""
echo "Checking essential libraries, tools and programs."
echo ""
AC_ARG_ENABLE(
[config],
[AS_HELP_STRING(
[--enable-config],
[Enable configuration check (default is yes)])],
[config=$enableval],
[config=yes])
if test "$config" = yes ; then
# Look for ocamlfind
AC_PATH_PROG(OCAMLFIND,ocamlfind,no)
# Checks for libraries.
AC_MSG_CHECKING(for ocaml library path)
OCAMLLIB=$(ocamlc -where)
AC_MSG_RESULT($OCAMLLIB)
if test "$OCAMLLIB" = ""; then
AC_MSG_ERROR(Cannot find ocaml library path)
fi
AC_PATH_PROG(MENHIR,menhir,no)
if test "$MENHIR" = "no"; then
AC_MSG_ERROR(Cannot find menhir)
fi
#Look for ANSITerminal
AC_MSG_CHECKING([for ANSITerminal])
if test -f c_check_ANSITerminal.ml ; then
if test -w c_check_ANSITerminal.ml ; then
rm c_check_ANSITerminal.* >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_ANSITerminal.ml. Please change its right with chmod 666 c_check_ANSITerminal.ml)
fi
fi
echo "open ANSITerminal;;" > c_check_ANSITerminal.ml
if (ocaml ANSITerminal.cma c_check_ANSITerminal.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
else
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(The ANSITerminal library is missing.)
else
if $OCAMLFIND query ANSITerminal > /dev/null 2>&1 ; then
ANSITERMINAL_INCLUDE="-I `$OCAMLFIND query ANSITerminal`"
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_ERROR(The ANSITerminal library is missing.)
fi
fi
fi
rm c_check_ANSITerminal.ml >& /dev/null
#Look for Log
AC_MSG_CHECKING([for log])
if test -f c_check_log.ml ; then
if test -w c_check_log.ml ; then
rm c_check_log.* >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_log.ml. Please change its right with chmod 666 c_check_log.ml)
fi
fi
echo "open Log;;" > c_check_log.ml
if (ocamlc -c log.cma c_check_log.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
else
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(The log library is missing.)
else
if $OCAMLFIND query log > /dev/null 2>&1 ; then
LOG_INCLUDE="-I `$OCAMLFIND query log`"
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_ERROR(The log library is missing.)
fi
fi
fi
rm c_check_log.* >& /dev/null
#Look for Dep2pict
AC_MSG_CHECKING([for dep2pict])
if test -f c_check_dep2pict.ml ; then
if test -w c_check_dep2pict.ml ; then
rm c_check_dep2pict.* >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_dep2pict.ml. Please change its right with chmod 666 c_check_dep2pict.ml)
fi
fi
echo "open Dep2pict;;" > c_check_dep2pict.ml
if (ocamlc -c dep2pict.cma c_check_dep2pict.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
else
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(The dep2pict library is missing.)
else
if $OCAMLFIND query dep2pict > /dev/null 2>&1 ; then
DEP2PICT_INCLUDE="-I `$OCAMLFIND query dep2pict`"
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_ERROR(The dep2pict library is missing.)
fi
fi
fi
rm c_check_dep2pict.* >& /dev/null
fi
AC_ARG_ENABLE(
[debug],
[AS_HELP_STRING([--enable-debug], [Display debug trace])],
[with_debug=$enableval],
[with_debug=no])
AC_ARG_ENABLE(
[warning],
[AS_HELP_STRING([--enable-warning], [Display warning trace])],
[with_warning=$enableval],
[with_warning=no])
AC_ARG_ENABLE(
[message],
[AS_HELP_STRING([--enable-message], [Display message trace])],
[with_message=$enableval],
[with_message=yes])
AC_ARG_ENABLE(
[info],
[AS_HELP_STRING([--enable-info], [Display info trace])],
[with_info=$enableval],
[with_info=yes])
if test "x$with_debug" != xno ; then
AC_SUBST(DEBUG,yes)
else
AC_SUBST(DEBUG,no)
fi
if test "x$with_warning" != xno ; then
AC_SUBST(WARNING,yes)
else
AC_SUBST(WARNING,no)
fi
if test "x$with_message" != xno ; then
AC_SUBST(MESSAGE,yes)
else
AC_SUBST(MESSAGE,no)
fi
if test "x$with_info" != xno ; then
AC_SUBST(INFO,yes)
else
AC_SUBST(INFO,no)
fi
#trunk directory
TRUNK=`pwd`
AC_SUBST(TRUNK)
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLOPT)
AC_SUBST(OCAMLLIB)
AC_SUBST(ANSITERMINAL_INCLUDE)
AC_SUBST(LOG_INCLUDE)
AC_SUBST(DEP2PICT_INCLUDE)
echo ""
AC_SUBST(SET_MAKE)
AC_CONFIG_FILES(\
config/Makefile \
Makefile \
src/Makefile \
src/parser/Makefile \
src/HTMLer/Makefile \
src/checker/Makefile \
)
VERSION=`grep "VERSION = .*" config/Makefile.in | sed 's|VERSION = \(.*\)|\1|'`
AC_SUBST(VERSION)
AC_PROG_MAKE_SET
echo ""
echo "Creating Makefiles"
echo ""
AC_OUTPUT
echo ""
echo "Some information"
echo ""
cd config && make infos
echo ""
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.67 for grew 1.0.
#
# Report bugs to <paul.masson@inria.fr>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
"
as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
as_have_required=no
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
CONFIG_SHELL=$as_shell as_have_required=yes
if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
break 2
fi
fi
done;;
esac
as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
$as_echo "$0: This script requires a shell more modern than all"
$as_echo "$0: the shells that I found on your system."
if test x${ZSH_VERSION+set} = xset ; then
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: paul.masson@inria.fr about your system, including any
$0: error possibly output before this message. Then install
$0: a modern shell, or manually run the script under such a
$0: shell if you do have one."
fi
exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/