~ubuntu-branches/ubuntu/trusty/coccinelle/trusty

« back to all changes in this revision

Viewing changes to setup/fake-menhir.sh

  • Committer: Package Import Robot
  • Author(s): Євгеній Мещеряков
  • Date: 2012-08-19 20:40:52 UTC
  • mfrom: (7.2.8 experimental)
  • Revision ID: package-import@ubuntu.com-20120819204052-8cujknwy6cn8a6h6
Tags: 1.0.0~rc15.deb-1
* New upstream RC 
  - Do not build-depend on libsexplib-camlp4-dev and libextlib-ocaml-dev
    anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
 
1
#! /bin/sh -e
 
2
 
 
3
set -e
2
4
 
3
5
# If you don't have menhir installed, but you do have the generated files, then
4
6
# this script fakes menhir by providing the generated files as the result of the
10
12
reqmli=
11
13
 
12
14
for arg in "$@"; do
13
 
  if test "x$STATE" == x0 -a "x$arg" == "x--base" -o "x$arg" == "x-b"; then
 
15
  if test "x$STATE" = x0 -a "x$arg" = "x--base" -o "x$arg" = "x-b"; then
14
16
    STATE=1
15
 
  elif test "x$STATE" == x1; then
 
17
  elif test "x$STATE" = x1; then
16
18
    base="$arg"
17
19
    STATE=0
18
20
  else
21
23
    extension="${filename##*.}"
22
24
 
23
25
    # assumes that all commandline parameters ending in .mly are files to be processed by menhir
24
 
    if test "x$extension" == xmly; then
 
26
    if test "x$extension" = xmly; then
25
27
      reqml="${basename}.ml"
26
28
      reqmli="${basename}.mli"
27
29