Re: #include <sane...> instead of "sane..."

From: Jochen Eisinger (jochen.eisinger@gno.de)
Date: Fri Nov 03 2000 - 16:12:14 PST

  • Next message: Jochen Eisinger: "Compile error on SGI/Irix"

    huh, this script...

    #!/bin/sh

    for file in `find -name "*.c"` `find -name "*.h"`; do

    ## Don't change frontends
    ##
    ## note: saned.c & test.c aren't real frontends (i.e. they need to
    include
    ## sanei_*.h files)
      if [ "`echo $file | grep frontend/`" != "" ] ; then

        if [ "`basename $file`" != "test.c" ] ; then

          if [ "`basename $file`" != "saned.c" ] ; then

            file=

          fi

        fi

      fi

      if [ "$file" != "" ] ; then

    ## Test wheter this file includes any sane/* files

        if grep -q "^#include.*[<\"]sane/[^<\"]*[>\"]" $file ; then

          cp $file /tmp/`basename $file`
          cat /tmp/`basename $file` | sed -e
    "/^#include.*[<\"]sane[^<\"]*[>\"]/s,[<>],\",g;s,\"sane/,\"../include/sane/,g"
    > $file
          rm -f /tmp/`basename $file`

        fi

      fi

    done

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Fri Nov 03 2000 - 16:09:32 PST