~ubuntu-branches/ubuntu/jaunty/ocamlbricks/jaunty

« back to all changes in this revision

Viewing changes to debian/generate_mli.sh

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Le Gall, Jonathan Roudiere, Sylvain Le Gall
  • Date: 2008-06-17 01:04:30 UTC
  • Revision ID: james.westby@ubuntu.com-20080617010430-0acrip736lwg9ziy
Tags: 0.50.1-1
[ Jonathan Roudiere ]
* Initial release (closes: Bug#477326) 
  First package of OCamlbricks, including documentation OCamldoc in HTML
  format and the build system use to build OCamlbricks like an example.

* Creation and adding *.mli (OCaml header files) in the package.

[ Sylvain Le Gall ]
* Final fix, review and upload 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Script provide with libocamlbricks-ocaml-dev packages
 
4
# utility: create *.mli files from sources in $TARGET directory. 
 
5
# where $TARGET is the first argument pass to the script
 
6
 
 
7
# directory to add in command line
 
8
OCAML_PATH=$(ocamlc -where)
 
9
# where we put *.mli files 
 
10
TARGET=$1
 
11
# to exclude a sources file word or regexp
 
12
EXCLUDE="stupid"
 
13
 
 
14
# if not exist create $TARGET directory 
 
15
mkdir -p $TARGET
 
16
 
 
17
# for all *.ml files found in sources directory 
 
18
for i in $(find ./[A-Z]*  -name \*.ml |grep -v $EXCLUDE |grep -v -e "/m[e,y]" );
 
19
do 
 
20
        # create the *.mli corresponding  
 
21
        ocamlc -I debian/tmp/$OCAML_PATH/ocamlbricks/ -I $OCAML_PATH/  -I $OCAML_PATH/lablgtk2/ \
 
22
                 -i $i > $TARGET/$(basename $i |sed s/'$'/'i'/g) 2> /dev/null
 
23
        done
 
24
 
 
25
# Not possible to build this .mli 
 
26
rm -f $TARGET/modelExtra.mli 2> /dev/null
 
27
 
 
28
exit 0