X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=lib%2Ffortran%2Fbuildlib.sh;h=d1f0db6870360a728d0e468a71f5f504654cbace;hb=cdfbc0a5125acf1dd25f6b385fae70f6af9e4122;hp=89485eb8ddc58695c23f9827d58b0a240401781d;hpb=38627116533d05d5e40e1ef762982f897f8affd2;p=h316.git diff --git a/lib/fortran/buildlib.sh b/lib/fortran/buildlib.sh deleted file mode 100755 index 89485eb..0000000 --- a/lib/fortran/buildlib.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -# Here we find the recipes for the libraries. -RECIPE_DIR=recipe - -# And their file suffix -RECIPE_SUFFIX=.recipe - -# Here go the new libraries -OUTPUT_DIR=./lib - -# This is needed as end-of-tape block for the loader -ENDBLOCK=$H316/snippets/endseq - -# Where to get the original libraries: -ORG_LIBDIR=original - -# And where to store the original objects -ORG_OBJDIR=org - -# The suffix for library files (in and out) -LIB_SUFFIX=.lib -####################################################################### - - -# Clean everything up -clean() { - rm -rf $OUTPUT_DIR $ORG_OBJDIR -} - -# Generate org directory containing the original library objects -make_org() { - if [ ! -d "$ORG_OBJDIR" ]; then - mkdir $ORG_OBJDIR - fi - tdir=$PWD - cd $ORG_OBJDIR - cat $tdir/$ORG_LIBDIR/*$LIB_SUFFIX | ldc -s -l - cd $tdir -} - -genlib(){ - echo "Library Builder start." - if [ ! -d "$OUTPUT_DIR" ]; then - echo -n "Creating $OUTPUT_DIR:" - mkdir $OUTPUT_DIR && echo "Ok." || echo "FAILED!" - fi - - - - RECIPE_LIST=`ls $RECIPE_DIR/*$RECIPE_SUFFIX` - for recipe in $RECIPE_LIST; do - lib=$OUTPUT_DIR/`basename $recipe $RECIPE_SUFFIX`$LIB_SUFFIX - echo "Building $lib:" - rm -f $lib - for item in `cat $recipe`; do - echo "appending $item." - cat $item >> $lib || (echo "Error! could not find:$item") - done - cat $ENDBLOCK >> $lib - done -} - - -case $1 in - clean) - echo "Clean!" - clean - ;; - makeorg) - echo "Make org!" - make_org - ;; - lib) - echo "Build Lib!" - genlib - ;; - *) - clean - make_org - genlib - ;; -esac - diff --git a/lib/fortran/buildlib.sh b/lib/fortran/buildlib.sh new file mode 120000 index 0000000..d1f0db6 --- /dev/null +++ b/lib/fortran/buildlib.sh @@ -0,0 +1 @@ +/home/hachti/h316/lib/common/buildlib.sh \ No newline at end of file