Browse files

Merge pull request #10 from MarwanG/packaging

Packaging
  • Loading branch information...
2 parents 2853b7d + 379d956 commit d76fdd9d4434bdb0b21e038ad1daa4c2e8c45424 @fredokun committed Jul 10, 2013
View
28 Makefile.in
@@ -0,0 +1,28 @@
+# where to install
+PREFIX = @prefix@
+BINDIR = $(PREFIX)/bin
+
+SRCS = $(wildcard src/*.ml src/*.mli src/*.mll src/*.mly)
+TARGS = arbogen
+KIND = native # d.byte
+FLAGS = -w,Ae,-warn-error,A
+
+all: $(TARGS)
+
+arbogen: _build/src/Arbogen.$(KIND)
+ cp $< $@
+
+install:: arbogen
+ mkdir -p $(BINDIR)
+ mv arbogen $(BINDIR)
+ mkdir -p $(MANDIR)/man1
+ cp -f doc/$(TARGS).1 /usr/local/man/man1/$(TARGS).1
+
+_build/src/%.$(KIND): $(SRCS)
+ ocamlbuild -cflags $(FLAGS) -no-links -I src $*.$(KIND)
+
+clean:
+ @ocamlbuild -clean
+ @rm -f *~ $(TARGS)
+
+.PHONY: all clean
View
147 configure.in
@@ -0,0 +1,147 @@
+#
+# autoconf input for Objective Caml programs
+# Copyright (C) 2001 Jean-Christophe Filliâtre
+# from a first script by Georges Mariano
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License version 2, as published by the Free Software Foundation.
+#
+# This library 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 version 2 for more details
+# (enclosed in the file LGPL).
+
+# the script generated by autoconf from this input will set the following
+# variables:
+# OCAMLC "ocamlc" if present in the path, or a failure
+# or "ocamlc.opt" if present with same version number as ocamlc
+# OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no"
+# OCAMLBEST either "byte" if no native compiler was found,
+# or "opt" otherwise
+# OCAMLDEP "ocamldep"
+# OCAMLLEX "ocamllex" (or "ocamllex.opt" if present)
+# OCAMLYACC "ocamlyac"
+# OCAMLLIB the path to the ocaml standard library
+# OCAMLVERSION the ocaml version number
+# OCAMLWEB "ocamlweb" (not mandatory)
+# OCAMLWIN32 "yes"/"no" depending on Sys.os_type = "Win32"
+# EXE ".exe" if OCAMLWIN32=yes, "" otherwise
+
+# check for one particular file of the sources
+# ADAPT THE FOLLOWING LINE TO YOUR SOURCES!
+AC_INIT(src/Gen.ml)
+
+# Check for Ocaml compilers
+
+# we first look for ocamlc in the path; if not present, we fail
+AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no)
+if test "$OCAMLC" = no ; then
+ AC_MSG_ERROR(Cannot find ocamlc.)
+fi
+
+# we extract Ocaml version number and library path
+OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
+echo "ocaml version is $OCAMLVERSION"
+OCAMLLIB=`$OCAMLC -v | tail -1 | cut -f 4 -d " "`
+echo "ocaml library path is $OCAMLLIB"
+
+# then we look for ocamlopt; if not present, we issue a warning
+# if the version is not the same, we also discard it
+# we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not
+AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no)
+OCAMLBEST=byte
+if test "$OCAMLOPT" = no ; then
+ AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.)
+else
+ AC_MSG_CHECKING(ocamlopt version)
+ TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.)
+ OCAMLOPT=no
+ else
+ AC_MSG_RESULT(ok)
+ OCAMLBEST=opt
+ fi
+fi
+
+# checking for ocamlc.opt
+AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no)
+if test "$OCAMLCDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+ OCAMLC=$OCAMLCDOTOPT
+ fi
+fi
+
+# checking for ocamlopt.opt
+if test "$OCAMLOPT" != no ; then
+ AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt,no)
+ if test "$OCAMLOPTDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
+ if test "$TMPVER" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+ OCAMLOPT=$OCAMLOPTDOTOPT
+ fi
+ fi
+fi
+
+# ocamldep, ocamllex and ocamlyacc should also be present in the path
+AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no)
+if test "$OCAMLDEP" = no ; then
+ AC_MSG_ERROR(Cannot find ocamldep.)
+fi
+
+AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex,no)
+if test "$OCAMLLEX" = no ; then
+ AC_MSG_ERROR(Cannot find ocamllex.)
+else
+ AC_CHECK_PROG(OCAMLLEXDOTOPT,ocamllex.opt,ocamllex.opt,no)
+ if test "$OCAMLLEXDOTOPT" != no ; then
+ OCAMLLEX=$OCAMLLEXDOTOPT
+ fi
+fi
+
+AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,no)
+if test "$OCAMLYACC" = no ; then
+ AC_MSG_ERROR(Cannot find ocamlyacc.)
+fi
+
+AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true)
+
+# platform
+AC_MSG_CHECKING(platform)
+if echo "let _ = Sys.os_type" | ocaml | grep -q Win32; then
+ AC_MSG_RESULT(Win32)
+ OCAMLWIN32=yes
+ EXE=.exe
+else
+ OCAMLWIN32=no
+ EXE=
+fi
+
+# substitutions to perform
+AC_SUBST(OCAMLC)
+AC_SUBST(OCAMLOPT)
+AC_SUBST(OCAMLDEP)
+AC_SUBST(OCAMLLEX)
+AC_SUBST(OCAMLYACC)
+AC_SUBST(OCAMLBEST)
+AC_SUBST(OCAMLVERSION)
+AC_SUBST(OCAMLLIB)
+AC_SUBST(OCAMLWEB)
+AC_SUBST(OCAMLWIN32)
+AC_SUBST(EXE)
+
+# Finally create the Makefile from Makefile.in
+AC_OUTPUT(Makefile)
+chmod a-w Makefile
View
58 debianBin.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#debianBin.sh
+#creates a binary debian package from source files
+
+
+if [ ! -f arbogen ]; then
+ echo "checking for binary file... no"
+ exit 1;
+else
+ echo "checking for binary file... ok"
+fi
+
+if which dpkg >/dev/null; then
+ echo "checking for dpkg... ok"
+else
+ echo "checking for dpkg... no"
+ exit 1;
+fi
+
+if which fakeroot >/dev/null; then
+ echo "checking for fakeroot... ok"
+else
+ echo "checking for fakeroot... no"
+ exit 1;
+fi
+#creating of directories
+file=arbogen_$1_1
+mkdir $file
+mkdir -p $file/DEBIAN
+mkdir -p $file/usr/bin
+mkdir -p $file/usr/share/doc/arbogen
+mkdir -p $file/usr/share/man/man1
+
+
+
+#creation of text files
+cat <<EOF > $file/DEBIAN/control
+Package: arbogen
+Version: $1
+Section: ocaml
+Priority: optional
+Source: arbogen
+Architecture: amd64
+Maintainer: Frédéric Peschanski <Frederic.Peschanski@lip6.fr>
+Description: Generates trees
+ Trees are generated randomly in different formats depending on grammar.
+EOF
+#placing files in correct place
+cp doc/arbogen.1 $file/usr/share/man/man1/arbogen.1
+gzip --best $file/usr/share/man/man1/arbogen.1
+cp LICENSE.txt $file/usr/share/doc/arbogen/copyright
+cp arbogen $file/usr/bin/
+
+chmod -R 755 $file
+chmod a-x $file/usr/share/man/man1/arbogen.1.gz
+chmod a-x $file/usr/share/doc/arbogen/copyright
+#packaging
+fakeroot dpkg-deb --build $file
View
49 doc/arbogen.1
@@ -0,0 +1,49 @@
+.\" Manpage for Arbogen.
+.\" Contact marwan.t.ghanem@gmail.com to correct errors or typos.
+.TH man 1 "05 June 2013" "1.0" "Arbogen man page"
+.SH NAME
+Arbogen \- creates a random tree.
+.SH SYNOPSIS
+Arbogen [options][filename]
+.SH DESCRIPTION
+Arbogen is a ocaml based program that generates random trees depending on grammer passed in .spec files.
+
+.SH OPTIONS
+The following command-line options are recognized by Arbogen.
+
+-version print version information
+
+-interactive activate interactive mode
+
+-verbose : set the verbosity level (a positive integer)
+
+-min : set the minimum size for the generated tree (a strictly positive integer)
+
+-max : set the maximum size for the generated tree (a strictly positive integer)
+
+-seed : set the random generator seed
+
+-eps1 : set the epsilon for singularity search (a strictly positive float number)
+
+-eps1_factor: set the refinement factor for epsilon in singularity search (a strictly positive float number)
+
+-eps2 : set the epsilon for Newton iteration (a strictly positive float number)
+
+-eps2_factor : set the refinement factor for epsilon in Newton iteration (a strictly positive float number)
+
+-try : set the maximum of tries when generating trees
+
+-type : set the type of output generated at the end
+
+-file : set the name of the file to be created at end of execution
+
+-zstart : sets the value of zstart
+
+-help :Display this list of options
+
+--help : Display this list of options
+
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Frederic Peschanski (frederic.peschanski@lip6.fr)
View
0 src/examples/binary.spec → examples/binary.spec
File renamed without changes.
View
0 src/examples/binary100000.spec → examples/binary100000.spec
File renamed without changes.
View
0 src/examples/binary1billion.spec → examples/binary1billion.spec
File renamed without changes.
View
0 src/examples/binary1million.spec → examples/binary1million.spec
File renamed without changes.
View
0 src/examples/nary.spec → examples/nary.spec
File renamed without changes.
View
0 src/examples/seq.spec → examples/seq.spec
File renamed without changes.
View
0 src/examples/seq2.spec → examples/seq2.spec
File renamed without changes.
View
0 src/examples/unarybinary.spec → examples/unarybinary.spec
File renamed without changes.
View
0 src/examples/unarybinary2.spec → examples/unarybinary2.spec
File renamed without changes.
View
240 m4/ocaml.m4
@@ -0,0 +1,240 @@
+dnl autoconf macros for OCaml
+dnl
+dnl Copyright © 2009 Richard W.M. Jones
+dnl Copyright © 2009 Stefano Zacchiroli
+dnl Copyright © 2000-2005 Olivier Andrieu
+dnl Copyright © 2000-2005 Jean-Christophe Filliâtre
+dnl Copyright © 2000-2005 Georges Mariano
+dnl
+dnl For documentation, please read the ocaml.m4 man page.
+
+AC_DEFUN([AC_PROG_OCAML],
+[dnl
+ # checking for ocamlc
+ AC_CHECK_TOOL([OCAMLC],[ocamlc],[no])
+
+ if test "$OCAMLC" != "no"; then
+ OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
+ AC_MSG_RESULT([OCaml version is $OCAMLVERSION])
+ # If OCAMLLIB is set, use it
+ if test "$OCAMLLIB" = ""; then
+ OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
+ else
+ AC_MSG_RESULT([OCAMLLIB previously set; preserving it.])
+ fi
+ AC_MSG_RESULT([OCaml library path is $OCAMLLIB])
+
+ AC_SUBST([OCAMLVERSION])
+ AC_SUBST([OCAMLLIB])
+
+ # checking for ocamlopt
+ AC_CHECK_TOOL([OCAMLOPT],[ocamlopt],[no])
+ OCAMLBEST=byte
+ if test "$OCAMLOPT" = "no"; then
+ AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
+ else
+ TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])
+ OCAMLOPT=no
+ else
+ OCAMLBEST=opt
+ fi
+ fi
+
+ AC_SUBST([OCAMLBEST])
+
+ # checking for ocamlc.opt
+ AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
+ if test "$OCAMLCDOTOPT" != "no"; then
+ TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.])
+ else
+ OCAMLC=$OCAMLCDOTOPT
+ fi
+ fi
+
+ # checking for ocamlopt.opt
+ if test "$OCAMLOPT" != "no" ; then
+ AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
+ if test "$OCAMLOPTDOTOPT" != "no"; then
+ TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.])
+ else
+ OCAMLOPT=$OCAMLOPTDOTOPT
+ fi
+ fi
+ fi
+
+ AC_SUBST([OCAMLOPT])
+ fi
+
+ AC_SUBST([OCAMLC])
+
+ # checking for ocaml toplevel
+ AC_CHECK_TOOL([OCAML],[ocaml],[no])
+
+ # checking for ocamldep
+ AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no])
+
+ # checking for ocamlmktop
+ AC_CHECK_TOOL([OCAMLMKTOP],[ocamlmktop],[no])
+
+ # checking for ocamlmklib
+ AC_CHECK_TOOL([OCAMLMKLIB],[ocamlmklib],[no])
+
+ # checking for ocamldoc
+ AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
+
+ # checking for ocamlbuild
+ AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
+])
+
+
+AC_DEFUN([AC_PROG_OCAMLLEX],
+[dnl
+ # checking for ocamllex
+ AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
+ if test "$OCAMLLEX" != "no"; then
+ AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
+ if test "$OCAMLLEXDOTOPT" != "no"; then
+ OCAMLLEX=$OCAMLLEXDOTOPT
+ fi
+ fi
+ AC_SUBST([OCAMLLEX])
+])
+
+AC_DEFUN([AC_PROG_OCAMLYACC],
+[dnl
+ AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
+ AC_SUBST([OCAMLYACC])
+])
+
+
+AC_DEFUN([AC_PROG_CAMLP4],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+
+ # checking for camlp4
+ AC_CHECK_TOOL([CAMLP4],[camlp4],[no])
+ if test "$CAMLP4" != "no"; then
+ TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([versions differs from ocamlc])
+ CAMLP4=no
+ fi
+ fi
+ AC_SUBST([CAMLP4])
+
+ # checking for companion tools
+ AC_CHECK_TOOL([CAMLP4BOOT],[camlp4boot],[no])
+ AC_CHECK_TOOL([CAMLP4O],[camlp4o],[no])
+ AC_CHECK_TOOL([CAMLP4OF],[camlp4of],[no])
+ AC_CHECK_TOOL([CAMLP4OOF],[camlp4oof],[no])
+ AC_CHECK_TOOL([CAMLP4ORF],[camlp4orf],[no])
+ AC_CHECK_TOOL([CAMLP4PROF],[camlp4prof],[no])
+ AC_CHECK_TOOL([CAMLP4R],[camlp4r],[no])
+ AC_CHECK_TOOL([CAMLP4RF],[camlp4rf],[no])
+ AC_SUBST([CAMLP4BOOT])
+ AC_SUBST([CAMLP4O])
+ AC_SUBST([CAMLP4OF])
+ AC_SUBST([CAMLP4OOF])
+ AC_SUBST([CAMLP4ORF])
+ AC_SUBST([CAMLP4PROF])
+ AC_SUBST([CAMLP4R])
+ AC_SUBST([CAMLP4RF])
+])
+
+
+AC_DEFUN([AC_PROG_FINDLIB],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+
+ # checking for ocamlfind
+ AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
+ AC_SUBST([OCAMLFIND])
+])
+
+
+dnl Thanks to Jim Meyering for working this next bit out for us.
+dnl XXX We should define AS_TR_SH if it's not defined already
+dnl (eg. for old autoconf).
+AC_DEFUN([AC_CHECK_OCAML_PKG],
+[dnl
+ AC_REQUIRE([AC_PROG_FINDLIB])dnl
+
+ AC_MSG_CHECKING([for OCaml findlib package $1])
+
+ unset found
+ unset pkg
+ found=no
+ for pkg in $1 $2 ; do
+ if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([found])
+ AS_TR_SH([OCAML_PKG_$1])=$pkg
+ found=yes
+ break
+ fi
+ done
+ if test "$found" = "no" ; then
+ AC_MSG_RESULT([not found])
+ AS_TR_SH([OCAML_PKG_$1])=no
+ fi
+
+ AC_SUBST(AS_TR_SH([OCAML_PKG_$1]))
+])
+
+
+AC_DEFUN([AC_CHECK_OCAML_MODULE],
+[dnl
+ AC_MSG_CHECKING([for OCaml module $2])
+
+ cat > conftest.ml <<EOF
+open $3
+EOF
+ unset found
+ for $1 in $$1 $4 ; do
+ if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then
+ found=yes
+ break
+ fi
+ done
+
+ if test "$found" ; then
+ AC_MSG_RESULT([$$1])
+ else
+ AC_MSG_RESULT([not found])
+ $1=no
+ fi
+ AC_SUBST([$1])
+])
+
+
+dnl XXX Cross-compiling
+AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+ AC_MSG_CHECKING([for OCaml compiler word size])
+ cat > conftest.ml <<EOF
+ print_endline (string_of_int Sys.word_size)
+ EOF
+ OCAML_WORD_SIZE=`$OCAML conftest.ml`
+ AC_MSG_RESULT([$OCAML_WORD_SIZE])
+ AC_SUBST([OCAML_WORD_SIZE])
+])
+
+AC_DEFUN([AC_CHECK_OCAML_OS_TYPE],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+ AC_MSG_CHECKING([OCaml Sys.os_type])
+
+ cat > conftest.ml <<EOF
+ print_string(Sys.os_type);;
+EOF
+
+ OCAML_OS_TYPE=`$OCAML conftest.ml`
+ AC_MSG_RESULT([$OCAML_OS_TYPE])
+ AC_SUBST([OCAML_OS_TYPE])
+])
View
22 opampackaging.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#opampackaging.sh
+#creates an opam package
+#the verision is passed as a parameter
+
+file=arbogen.$1
+mkdir $file
+
+cat <<EOF > $file/descr
+Random tree generator to be continued
+EOF
+cat <<EOF > $file/opam
+opam-version: "1"
+maintainer: "Frédéric Peschanski <Frederic.Peschanski@lip6.fr>"
+build: [
+ ["make -C src/ all"]
+ ["make -C src/ install"]
+]
+EOF
+cat <<EOF > $file/url
+to be decided later can be git repo but master needs to be updated first
+EOF
View
40 packaging.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#packaging.sh
+#creates an install package for using the files in its directory
+#the verision is passed as a parameter
+
+pack=arbogen_$1
+
+#testing if in correct folder
+if [ ! -f configure.in ]; then
+ echo "checking if in correct folder... no"
+ exit 1;
+else
+ echo "checking if in correct folder... ok"
+fi
+
+#testing if need package exists
+if which autoconf >/dev/null; then
+ echo "checking for autoconf... ok"
+else
+ echo "checking for autoconf... no"
+ exit 1;
+fi
+
+#creating required package
+echo "creating package"
+autoconf
+mkdir $pack
+cp -r src/ $pack
+cp Makefile.in $pack/Makefile.in
+cp configure $pack/configure
+cp LICENSE.txt $pack/LICENCE.txt
+cp README.md $pack/README.md
+cp AUTHORS $pack/AUTHORS
+cp -r doc/ $pack
+tar -cvzf $pack.tar.gz $pack
+
+#removing unneeded files
+rm -rf autom4te.cache
+rm configure
+rm -rf $pack
View
39 src/Makefile
@@ -1,18 +1,35 @@
-SRCS = $(wildcard *.ml *.mli *.mll *.mly)
+# where to install the binaries
+prefix=/usr/local
+exec_prefix=${prefix}
+BINDIR=${exec_prefix}/bin
+
+# where to install the man page
+MANDIR=${prefix}/share/man
+
+# other variables set by ./configure
+OCAMLC = ocamlc
+OCAMLOPT = ocamlopt
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLYACC= ocamlyacc
+OCAMLLIB = /usr/lib/ocaml
+OCAMLBEST= op
+
+SRCS = Options.ml Util.ml Grammar.ml CombSys.ml OracleSimple.ml Tree.ml Gen.ml GParser.ml ArboLib.ml Arbogen.ml
TARGS = arbogen
-KIND = native # d.byte
-FLAGS = -w,Ae,-warn-error,A
all: $(TARGS)
-arbogen: _build/Arbogen.$(KIND)
- cp $< $@
+arbogen: $(SRCS)
+ $(OCAMLOPT) -o arbogen $(SRCS)
-_build/%.$(KIND): $(SRCS)
- ocamlbuild -cflags $(FLAGS) -no-links $*.$(KIND)
-clean:
- @ocamlbuild -clean
- @rm -f *~ $(TARGS)
+install:: arbogen
+ mkdir -p $(BINDIR)
+ mv arbogen $(BINDIR)
+ mkdir -p $(MANDIR)/man1
+ cp -f doc/$(TARGS).1 /usr/local/man/man1/$(TARGS).1
-.PHONY: all clean
+clean:
+ rm arbogen
+ rm *.cmi *.cmx *.o

0 comments on commit d76fdd9

Please sign in to comment.