]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/patch_deps.sh
paramodulation now compiles with ocaml 3.09 in opt mode (added -for-pack)
[helm.git] / helm / ocaml / patch_deps.sh
1 #!/bin/sh
2 # script args: source_file target_file
3
4 use_clusters='no'
5 if [ ! -z "$USE_CLUSTERS" ]; then
6   use_clusters=$USE_CLUSTERS
7 fi
8
9 # args: file snippet
10 # file will be modified in place
11 include_dot_snippet ()
12 {
13   echo "Adding to $1 graphviz snipet $2 ..."
14   sed -i "/digraph/r $2" $1
15 }
16
17 # args: file patch
18 apply_patch ()
19 {
20   if [ -f "$2" ]; then
21     echo "Applying to $1 patch $2 ..."
22     patch $1 $2
23   fi
24 }
25
26 cp $1 $2
27 apply_patch $2 deps.patch
28 include_dot_snippet $2 daemons.dot
29 if [ "$use_clusters" = "yes" ]; then
30   include_dot_snippet $2 clusters.dot
31 fi
32