<commit_before>#! /bin/sh

# Script to generate a shared library.
# Called by main Makefile.
#
# Author: <NAME>, 29/2/2000

if [ "$1" = "-v" ] ; then
   MAJOR=$2
   MINOR=$3
   REVIS=$4
   shift
   shift
   shift
   shift
fi

PLATFORM=$1
LD=$2
LDFLAGS=$3
SOFLAGS=$4
SONAME=$5
LIB=$6
OBJS=$7
EXTRA=$8

rm -f $LIB

if [ $PLATFORM = "aix" ]; then
   makeshared="/usr/ibmcxx/bin/makeC++SharedLib"
fi
if [ $PLATFORM = "aix5" ]; then
   makeshared="/usr/vacpp/bin/makeC++SharedLib"
fi

if [ $PLATFORM = "aix" ] || [ $PLATFORM = "aix5" ]; then
   if [ $LD = "xlC" ]; then
      if [ $LIB = "lib/libCint.a" ]; then
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA
      elif [ $LIB = "lib/libCore.a" ]; then
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCint
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCint
      else
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCore -lCint
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCore -lCint
      fi
   fi
elif [ $PLATFORM = "alphaegcs" ] || [ $PLATFORM = "hpux" ] || \
     [ $PLATFORM = "solaris" ]   || [ $PLATFORM = "sgi" ]; then
   echo $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
elif [ $PLATFORM = "lynxos" ]; then
   echo ar rv $LIB $OBJS $EXTRA
   ar rv $LIB $OBJS $EXTRA
elif [ $PLATFORM = "fbsd" ]; then
   echo $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $SOFLAGS $LDFLAGS -o $LIB `lorder $OBJS | tsort -q` $EXTRA
   # for elf:  echo $PLATFORM: $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS
   # for elf:  $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB `lorder $OBJS | tsort -q`
elif [ $PLATFORM = "macosx" ]; then
   # We need two library files: a .dylib to link to and a .so to load
   BUNDLE=`echo $LIB | sed s/.dylib/.so/`
   echo $LD $SOFLAGS $SONAME -o $LIB $OBJS \
	$([ -d /sw/lib ] && echo -L/sw/lib) -ldl $EXTRA
   $LD $SOFLAGS $SONAME -o $LIB $OBJS \
	$([ -d /sw/lib ] && echo -L/sw/lib) -ldl $EXTRA
   if [ "x`echo $SOFLAGS | grep -- '-g'`" != "x" ]; then
      opt=-g
   else
      opt=-O
   fi
   echo $LD $opt -bundle -flat_namespace -undefined suppress -o $BUNDLE \
	$OBJS $([ -d /sw/lib ] && echo -L/sw/lib) -ldl $EXTRA
   $LD $opt -bundle -flat_namespace -undefined suppress -o $BUNDLE \
	$OBJS $([ -d /sw/lib ] && echo -L/sw/lib) -ldl $EXTRA
elif [ $LD = "KCC" ]; then
   echo $LD $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $LDFLAGS -o $LIB $OBJS $EXTRA
else
   if [ "x$MAJOR" = "x" ] ; then
      echo $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXTRA
      $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXTRA
   else
      echo $LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS -o $LIB.$MAJOR.$MINOR $OBJS $EXTRA
      $LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS \
         -o $LIB.$MAJOR.$MINOR $OBJS $EXTRA
   fi
fi

linkstat=$?
if [ $linkstat -ne 0 ]; then
   exit $linkstat
fi<commit_msg>not all shells understand $() syntax, replace by ` `.<commit_after>#! /bin/sh

# Script to generate a shared library.
# Called by main Makefile.
#
# Author: <NAME>, 29/2/2000

if [ "$1" = "-v" ] ; then
   MAJOR=$2
   MINOR=$3
   REVIS=$4
   shift
   shift
   shift
   shift
fi

PLATFORM=$1
LD=$2
LDFLAGS=$3
SOFLAGS=$4
SONAME=$5
LIB=$6
OBJS=$7
EXTRA=$8

rm -f $LIB

if [ $PLATFORM = "aix" ]; then
   makeshared="/usr/ibmcxx/bin/makeC++SharedLib"
fi
if [ $PLATFORM = "aix5" ]; then
   makeshared="/usr/vacpp/bin/makeC++SharedLib"
fi

if [ $PLATFORM = "aix" ] || [ $PLATFORM = "aix5" ]; then
   if [ $LD = "xlC" ]; then
      if [ $LIB = "lib/libCint.a" ]; then
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA
      elif [ $LIB = "lib/libCore.a" ]; then
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCint
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCint
      else
         echo $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCore -lCint
         $makeshared -o $LIB -p 0 $OBJS -Llib $EXTRA -lCore -lCint
      fi
   fi
elif [ $PLATFORM = "alphaegcs" ] || [ $PLATFORM = "hpux" ] || \
     [ $PLATFORM = "solaris" ]   || [ $PLATFORM = "sgi" ]; then
   echo $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
elif [ $PLATFORM = "lynxos" ]; then
   echo ar rv $LIB $OBJS $EXTRA
   ar rv $LIB $OBJS $EXTRA
elif [ $PLATFORM = "fbsd" ]; then
   echo $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $SOFLAGS $LDFLAGS -o $LIB `lorder $OBJS | tsort -q` $EXTRA
   # for elf:  echo $PLATFORM: $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS
   # for elf:  $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB `lorder $OBJS | tsort -q`
elif [ $PLATFORM = "macosx" ]; then
   # We need two library files: a .dylib to link to and a .so to load
   BUNDLE=`echo $LIB | sed s/.dylib/.so/`
   echo $LD $SOFLAGS $SONAME -o $LIB $OBJS \
	`[ -d /sw/lib ] && echo -L/sw/lib` -ldl $EXTRA
   $LD $SOFLAGS $SONAME -o $LIB $OBJS \
	`[ -d /sw/lib ] && echo -L/sw/lib` -ldl $EXTRA
   if [ "x`echo $SOFLAGS | grep -- '-g'`" != "x" ]; then
      opt=-g
   else
      opt=-O
   fi
   echo $LD $opt -bundle -flat_namespace -undefined suppress -o $BUNDLE \
	$OBJS `[ -d /sw/lib ] && echo -L/sw/lib` -ldl $EXTRA
   $LD $opt -bundle -flat_namespace -undefined suppress -o $BUNDLE \
	$OBJS `[ -d /sw/lib ] && echo -L/sw/lib` -ldl $EXTRA
elif [ $LD = "KCC" ]; then
   echo $LD $LDFLAGS -o $LIB $OBJS $EXTRA
   $LD $LDFLAGS -o $LIB $OBJS $EXTRA
else
   if [ "x$MAJOR" = "x" ] ; then
      echo $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXTRA
      $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXTRA
   else
      echo $LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS -o $LIB.$MAJOR.$MINOR $OBJS $EXTRA
      $LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS \
         -o $LIB.$MAJOR.$MINOR $OBJS $EXTRA
   fi
fi

linkstat=$?
if [ $linkstat -ne 0 ]; then
   exit $linkstat
fi
{'fraction_non_alphanumeric': 0.17302405498281787, 'fraction_numerical': 0.009621993127147767, 'mean_word_length': 2.5087402049427365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2058275', 'n_tokens_mistral': 2533, 'n_tokens_neox': 2491, 'n_words': 736}