From 4cd6d4da36b7f61b8cd8a22d849590ed6143f2e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Wed, 24 Jul 2013 23:50:43 +0200 Subject: [PATCH] Remove un-needed scripts --- tools/odeps.sh | 87 -------------------------------------------------- tools/osort.sh | 49 ---------------------------- 2 files changed, 136 deletions(-) delete mode 100755 tools/odeps.sh delete mode 100755 tools/osort.sh diff --git a/tools/odeps.sh b/tools/odeps.sh deleted file mode 100755 index 2443c21..0000000 --- a/tools/odeps.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -#Save the parameters - -PROG="$0" -CMDLINE="$*" -usage() { - echo "$PROG [ocamldep ... ]" -} - -OPTIONS="" -INCLUDES="" -ARGS="" -NATIVE=0 -while true; do - case $1 in - -ppopt) - OPTIONS="$OPTIONS $1 $2" - shift - ;; - -I) - OPTIONS="$OPTIONS $1 $2" - INCLUDES="$INCLUDES $2" - shift - ;; - -native) - NATIVE=1 - OPTIONS="$OPTIONS $1" - ;; - *.ml*) - ARGS="$ARGS $1" - ;; - *) - OPTIONS="$OPTIONS $1" - ;; - esac - if test "$#" -eq 0; then break; else shift; fi -done - -if test "$NATIVE" -eq 1; then - OEXT="cmx" -else - OEXT="cmo" -fi -IEXT="cmi" - -for src in $ARGS; do - $OPTIONS -modules "$src" | while read file deps; do - if test -z "$file"; then continue; fi - file=${file%:} - if test "$file" != "${file%.mli}"; then - ext="$IEXT" - base="${file%.mli}" - src_ext="mli" - else - ext="$OEXT" - base="${file%.ml}" - src_ext="ml" - fi - dependencies="" - for dep in $deps; do - modbase=$(echo $dep | sed 's/\(.*\)/\l\1/') - for dir in $INCLUDES; do - dir=${dir%/} #remove trailing slash, if any - #Interfaces or bytecode objects depends on other compile interfaces - #if they exists, otherwise they depend on the object - if test \( "$ext" = "cmi" -o "$ext" = "cmo" \) -a -f "$dir"/"$modbase".mli ; then - dependencies="$dependencies $dir/$modbase".cmi - break - elif test -f "$dir"/"$modbase".ml -o -f "$dir"/"$modbase".mly -o -f "$dir"/"$modbase".mll -o -d "$dir"/"$modbase"; then - dependencies="$dependencies $dir/$modbase"."$ext" - break - fi - done - done - #finally add the cmi as dependency of the cmo/cmx, - #if the .mli exists - if test "$ext" != "cmi" -a -f "$base".mli ; then - dependencies=" ${base}.cmi${dependencies}" - fi - #output a phony dependency between the cmi and the cmx/cmo if there is no .mli - if test "$ext" != "cmi" -a ! -f "$base".mli; then - echo "${base}.cmi: ${base}.${ext}" - fi - echo "${base}.${ext}:${dependencies}" - done - -done diff --git a/tools/osort.sh b/tools/osort.sh deleted file mode 100755 index b967ee3..0000000 --- a/tools/osort.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -EXT="$1" -if [ -z "$EXT" ] -then - EXT="cmx" -fi - -TARGET="$2" - -DEPS=$( -while read target deps -do - target="${target%.ml:}.$EXT" - dir=$(dirname "$target") - echo -n "$target":" " - for d in $deps - do - base=$(echo "$d" | sed 's/\(.*\)/\l\1/g' ) - if [ -f "$dir"/"$base".ml -o -d "$dir"/"$base" ] - then - echo -n "$dir"/"$base"".$EXT " - fi - done - echo -done) - -SORTED="" -while true -do - ROOT=$(echo "$DEPS" | grep '^[^ ]*.'$EXT': *$' | cut -f 1 -d: ) - NDEPS=$(echo "$DEPS" | grep -v '^[^ ]*.'$EXT': *$') - if [ "$DEPS" = "$NDEPS" ] - then - SORTED="$SORTED $(echo $DEPS | cut -f 2 -d :)" - SORTED="$SORTED $(echo $DEPS | cut -f 1 -d :)" - break - fi - SORTED="$SORTED $ROOT" - for r in $ROOT - do - DEPS=$(echo "$DEPS" | sed "s|$r:\?||g") - done -done -for i in $SORTED -do -echo -n "$i " -done -echo -- 2.17.1