aboutsummaryrefslogtreecommitdiffhomepage
path: root/build-windows/gen-public-headers.sh
blob: d557f3f703abedc44bad5ca324cc9f6d00235145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

files=""

list_headers()
{
  local filename="$1"
  
  if echo $files | grep "\[$filename\]" >/dev/null ; then
    return
  fi
  
  local path="`find . -name $filename`"
  echo $path | sed 's/^.\//src\//' | sed 's/\//\\/g'
  files="$files[$filename]"
  subfilenames="`grep '#include <MailCore/' "$path" | sed 's/^#include <MailCore\/\(.*\)>$/\1/'`"
  subfilenames+=" "
  subfilenames+="`grep '#import <MailCore/' "$path" | sed 's/^#import <MailCore\/\(.*\)>$/\1/'`"
  for include_dir in $subfilenames ; do
    list_headers $include_dir
  done
}

cd ../src
list_headers MailCore.h