Page 1 of 1

[Nagios-devel] Build environment diff

Posted: Fri Oct 22, 2004 12:53 pm
by Guest
This is a multi-part message in MIME format.
--------------060503070401020406040503
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hey all.

I started working on the latest CVS today, and noticed an error in the
base Makefile which doesn't remove the ./configure generated script
subst when doing make distclean.

This patch takes care of that, and also points new developers to a few
compiler options they can turn on to compile their added code with -Wall
and everything else that can easily generate error messages.

I've used those stricter options to clean up the code a bit and make it
compile nearly clean with all warnings enabled. I'm testing it now, so
I'll get back with patches later.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer

--------------060503070401020406040503
Content-Type: text/plain;
name="nagios-build-devel.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-build-devel.diff"

diff -ur ../Nagios/Makefile.in ./Makefile.in
--- ../Nagios/Makefile.in Fri Oct 22 18:51:37 2004
+++ ./Makefile.in Fri Oct 22 22:37:52 2004
@@ -157,7 +157,7 @@
cd $(SRC_MODULE) && $(MAKE) $@
rm -f sample-config/*.cfg sample-config/template-object/*.cfg sample-config/default-object/*.cfg
rm -f daemon-init pkginfo
- rm -f Makefile
+ rm -f Makefile subst

devclean: distclean

diff -ur ../Nagios/base/Makefile.in ./base/Makefile.in
--- ../Nagios/base/Makefile.in Fri Oct 22 18:51:24 2004
+++ ./base/Makefile.in Fri Oct 22 20:21:57 2004
@@ -13,6 +13,11 @@
CC=@CC@
CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE
#CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCORE
+CFLAGS_WARN =-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
+CFLAGS_WARN+=-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
+CFLAGS_DEBUG=-ggdb3 -g3
+# Contributors and debuggers, uncomment the following line
+#CFLAGS+=$(CFLAGS_WARN) $(CFLAGS_DEBUG)
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@

diff -ur ../Nagios/cgi/Makefile.in ./cgi/Makefile.in
--- ../Nagios/cgi/Makefile.in Fri Oct 22 18:51:29 2004
+++ ./cgi/Makefile.in Fri Oct 22 20:22:20 2004
@@ -28,6 +28,11 @@
CC=@CC@
CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI
#CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCGI
+CFLAGS_WARN =-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
+CFLAGS_WARN+=-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
+CFLAGS_DEBUG=-ggdb3 -g3
+# Contributors and debuggers, uncomment the following line
+#CFLAGS+=$(CFLAGS_WARN) $(CFLAGS_DEBUG)
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@

--------------060503070401020406040503--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]