"Fossies" - the Fresh Open Source Software Archive

Member "libisoburn-1.5.4/releng/auto_cxx" (8 Jul 2020, 2002 Bytes) of package /linux/misc/libisoburn-1.5.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 # Copyright 2011 George Danchev <danchev@spnet.net>
    4 # Licensed under GNU GPL version 2 or later
    5 
    6 set -e
    7 
    8 not_in_releng_exit() {
    9   printf "\nPlease execute the tests from releng directory.\n\n"
   10   exit 1
   11 }
   12 
   13 . inc/releng_getopts.inc || not_in_releng_exit
   14 
   15 print_specific_help() {
   16 cat << HLP
   17 Specific options:
   18        none yet.
   19 Overview:
   20  Tests both xorriso/xorriso.h and libisoburn/libisoburn.h
   21  APIs for C++ cleanness.
   22 HLP
   23 }
   24 
   25 if test "$SPECIFIC_HELP" = 1; then
   26   print_specific_help
   27   exit 0
   28 fi
   29 
   30 # xorriso binary is not needed for that particular test
   31 SAMPLE_CODE_DIR=codesamples
   32 CC=g++
   33 
   34 # check compiler
   35 if ! which "${CC}" >/dev/null 2>&1; then
   36     printf "\n${SELF}: Not found: ${CC}. Install ${CC}.\n"
   37     cleanup
   38     exit 5
   39 fi
   40 
   41 # check data dir
   42 if [ -d "${GEN_DATA_DIR}" ]; then
   43  printf "\n${SELF}: directory %s exists!" ${GEN_DATA_DIR}
   44  printf "\n${SELF}: use '${SELF} -c' to remove.\n"
   45  exit 6
   46 else
   47  mkdir "${GEN_DATA_DIR}"
   48 fi
   49 
   50 INCLUDE_DIRS="-I../ -I../../libburn -I../../libisofs -I/usr/local/include -I/usr/pkg/include"
   51 
   52 # process sample code tests
   53  for SMPL in `ls "${SAMPLE_CODE_DIR}"/*.cpp`; do
   54    # CMD_CPL="${CC} -I../ -L ../libisoburn/.libs/ ${CFLAGS} -lisoburn -o ${SMPL}.obj ${SMPL}"
   55    CMD_CPL="${CC} -c ${INCLUDE_DIRS} ${CFLAGS} -o ${SMPL}.obj ${SMPL}"
   56    printf "${SELF}: ${CMD_CPL}"
   57    set +e
   58    ${CMD_CPL}
   59    RET_CPL="$?"
   60    if [ ${RET_CPL} = 0 -a -f ${SMPL}.obj ]; then
   61       mv ${SMPL}.obj ${GEN_DATA_DIR}
   62       printf "...ok\n"
   63    else
   64       printf "\nFAIL : ${SELF}: Compilation of ${SMPL}\n"
   65       cleanup
   66       exit 7
   67    fi
   68 #   BASE=$(basename ${SMPL}.obj)
   69 #   printf "${SELF}: Running LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}"
   70 #   LD_LIBRARY_PATH=../libisoburn/.libs/:${LD_LIBRARY_PATH} ${GEN_DATA_DIR}/${BASE}
   71 #   RET_SMPL="$?"
   72 #   case ${RET_SMPL} in
   73 #    0)
   74 #     printf "...ok\n"
   75 #    ;;
   76 #    *)
   77 #     printf "exit code: ${RET_SMPL}\n"
   78 #     cleanup
   79 #     exit 8
   80 #    ;;
   81 #   esac
   82    set -e
   83  done
   84 
   85 # clean
   86 cleanup
   87 
   88 exit 0