File: checkheaders.sh

package info (click to toggle)
gromacs 2025.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 287,236 kB
  • sloc: xml: 3,718,478; cpp: 654,820; ansic: 75,282; python: 20,471; sh: 3,471; perl: 2,218; yacc: 644; fortran: 397; lisp: 265; makefile: 171; lex: 125; awk: 68; csh: 39
file content (23 lines) | stat: -rwxr-xr-x 352 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

incldir="../include"
rm -f gromacs
ln -s $incldir gromacs

if [ -z "$1" ]; then
  files=$(cd $incldir; find -name "*.h" | sed 's/^\./gromacs/')
else
  files="$@"
fi

for i in $files; do
  echo $i
  cat << EOF > t.c
#include <$i>
int main(){
  return 0;
}
EOF
  gcc -I. -c t.c -D bool=int || echo "Failed"
done
rm -f gromacs t.[co]