Mercurial > mplayer.hg
annotate help/help_check.sh @ 35881:b5abdfe9bc61
Replace some uses of off_t by uint64_t.
This allows code that does not rely on lseek etc. to work
even on systems that do not support 64 bit off_t yet.
Signed-off-by: Reimar Dffinger <Reimar.Doeffinger@gmx.de>
author | reimar |
---|---|
date | Sat, 16 Mar 2013 10:09:12 +0000 |
parents | 4df5cb727be4 |
children | cb9975cda4bc |
rev | line source |
---|---|
34890
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
1 #!/bin/sh |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
2 # Check help message header files. |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
3 |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
4 CHECK=checkhelp |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
5 |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
6 trap "rm -f ${CHECK}.c ${CHECK}.o" EXIT |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
7 |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
8 CC=$1 |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
9 shift |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
10 |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
11 for h in "$@"; do |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
12 cat <<EOF > ${CHECK}.c |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
13 #include <inttypes.h> |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
14 #include <string.h> |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
15 #include "config.h" |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
16 #include "$h" |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
17 void $CHECK () { |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
18 EOF |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
19 sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\)[ \t].*:strdup(\1);:p" "$h" >> ${CHECK}.c |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
20 echo "}" >> ${CHECK}.c |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
21 $CC -Werror -c -o ${CHECK}.o ${CHECK}.c || exit |
4df5cb727be4
Add a Makefile target for testing the help message text headers.
ib
parents:
diff
changeset
|
22 done |