Checks whether "-Wdelcaration-after-statement" is available in gcc before

trying to use it (simple shell script trick from Shin-Ichi).
This commit is contained in:
William Kendrick 2005-10-13 07:48:20 +00:00
parent 050c23b5ef
commit 905b5552fa
3 changed files with 14 additions and 3 deletions

View file

@ -6,7 +6,7 @@
# bill@newbreedsoftware.com
# http://www.newbreedsoftware.com/tuxpaint/
# June 14, 2002 - October 9, 2005
# June 14, 2002 - October 13, 2005
# The version number, for release:
@ -100,7 +100,7 @@ CFLAGS=-O2 -W -Wall -fno-common -ffast-math \
-Wbad-function-cast -Wwrite-strings \
-Waggregate-return \
-Wstrict-prototypes -Wmissing-prototypes \
-Wdeclaration-after-statement \
`src/test-option.sh -Wdeclaration-after-statement` \
-DVER_VERSION=\"$(VER_VERSION)\" \
-DVER_DATE=\"$(VER_DATE)\"

View file

@ -7,7 +7,7 @@ bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
2005.October.10 (0.9.15)
2005.October.13 (0.9.15)
* Speed improvements:
-------------------
@ -235,6 +235,11 @@ http://www.newbreedsoftware.com/tuxpaint/
* Compiling, porting and packaging updates:
-----------------------------------------
* Added "test-option.sh" shell script, which can be used in Makefile
for basic compiler option tests
(e.g., is "-Wdeclaration-after-statement" available?)
TOYAMA Shin-ichi <shin1@wmail.plala.or.jp>
* Created 'release' Makefile target, which generates a .tar.gz
(sans CVS-related files) based on the clean source directory.

6
src/test-option.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
echo 'main(){}' > dummy.c
gcc $1 dummy.c > /dev/null 2>&1 && echo $1
rm -f dummy.c a.out