Edit

kc3-lang/libbsd/test/headers-overlay.sh

Branch :

  • Show log

    Commit

  • Author : Guillem Jover
    Date : 2023-04-17 23:59:19
    Hash : 90b7f3ae
    Message : test: Do not use /dev/null as compiler output file Some ld(1) implementations, such as the one on AIX, do not support using /dev/null as the output filename for the compiled object. Use an actual filename that we will then clean up.

  • test/headers-overlay.sh
  • #!/bin/sh
    
    set -e
    
    run()
    {
      echo "$@"
      "$@"
    }
    
    incdir="${top_srcdir}/include/bsd"
    CPPFLAGS="$CPPFLAGS -DLIBBSD_OVERLAY"
    
    for inc in $(cd $incdir; find -name '*.h' | sort | cut -c3-); do
      cat >headers-overlay-gen.c <<SOURCE
    #include <$inc>
    int main() { return 0; }
    SOURCE
    
      echo "testing header $inc"
      run $CC -isystem "$incdir" $CPPFLAGS headers-overlay-gen.c -o headers-overlay
      echo
    
      rm -f headers-overlay
      rm -f headers-overlay-gen*
    done