File: checkheaders.sh

package info (click to toggle)
gromacs 2020.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 172,184 kB
  • sloc: cpp: 490,183; xml: 255,123; ansic: 38,620; python: 13,747; sh: 3,333; perl: 2,457; yacc: 644; fortran: 397; makefile: 246; lisp: 214; lex: 129; awk: 68; csh: 39
file content (23 lines) | stat: -rwxr-xr-x 345 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/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]