From 905b5552fa7bc64255da294d32129a2d51a0a9bc Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Thu, 13 Oct 2005 07:48:20 +0000 Subject: [PATCH] Checks whether "-Wdelcaration-after-statement" is available in gcc before trying to use it (simple shell script trick from Shin-Ichi). --- Makefile | 4 ++-- docs/CHANGES.txt | 7 ++++++- src/test-option.sh | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 src/test-option.sh diff --git a/Makefile b/Makefile index c9d21cdb1..a014296e6 100644 --- a/Makefile +++ b/Makefile @@ -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)\" diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 1a1e51166..0a8029ef9 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -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 + * Created 'release' Makefile target, which generates a .tar.gz (sans CVS-related files) based on the clean source directory. diff --git a/src/test-option.sh b/src/test-option.sh new file mode 100755 index 000000000..6be410174 --- /dev/null +++ b/src/test-option.sh @@ -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 +