From 37283ce7b325fc5d7bbdbf03513ccdd9463762d5 Mon Sep 17 00:00:00 2001 From: aquanight Date: Sat, 19 Jan 2008 16:58:18 +0000 Subject: Modules using NoPedantic now properly respect 'make debug'. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8737 e03df62e-2008-0410-955e-edbf42e46eb7 --- .Makefile.inc | 8 +++++--- configure | 13 +++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.Makefile.inc b/.Makefile.inc index 3afbf67a8..c753bda94 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -9,8 +9,10 @@ CC = @CC@ MAKE = @MAKEPROG@ PROGS = inspircd -FLAGS = @FLAGS@ -DEBUG = @DEVELOPER@ +NICEFLAGS = @FLAGS@ +FLAGS = $(NICEFLAGS) -pedantic +NICEDEBUG = @DEVELOPER@ +DEBUG = $(NICEDEBUG) -pedantic LDLIBS = @LDLIBS@ BASE = $(DESTDIR)@BASE_DIR@ CONPATH = $(DESTDIR)@CONFIG_DIR@ @@ -38,7 +40,7 @@ debug: @echo "* experiencing problems. *" @echo "* *" @echo "*************************************" - ${MAKE} -C . 'FLAGS=${DEBUG}' all + ${MAKE} -C . 'FLAGS=${DEBUG}' 'NICEFLAGS=${NICEDEBUG}' all mods: @echo "Making modules..." diff --git a/configure b/configure index f47b641e1..651cadd75 100755 --- a/configure +++ b/configure @@ -1034,13 +1034,13 @@ our $SHARED = ""; sub getosflags { $config{LDLIBS} = "-lstdc++"; - $config{FLAGS} = "-fPIC -Wall -pedantic $config{OPTIMISATI}"; - $config{DEVELOPER} = "-fPIC -Wall -pedantic -g"; + $config{FLAGS} = "-fPIC -Wall $config{OPTIMISATI}"; + $config{DEVELOPER} = "-fPIC -Wall -g"; $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared" unless defined $opt_disablerpath; $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { - $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -pedantic $config{OPTIMISATI}"; + $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall $config{OPTIMISATI}"; $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup"; $config{LDLIBS} = "-ldl -lstdc++"; } @@ -1061,7 +1061,7 @@ sub getosflags { if ($config{OSNAME} =~ /Linux/i) { $config{LDLIBS} = "-ldl -lstdc++"; - $config{FLAGS} = "-fPIC -Wall -pedantic $config{OPTIMISATI}"; + $config{FLAGS} = "-fPIC -Wall $config{OPTIMISATI}"; $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS}); $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS}); $config{MAKEPROG} = "make"; @@ -1351,14 +1351,11 @@ EOCHEESE #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n"; - my $nicerflags = $config{FLAGS}; - $nicerflags =~ s/-pedantic//g; - if (nopedantic("src/modules/m_".$i.".cpp")) { print FILEHANDLE " m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps - \$(CC) -pipe -I../../include $nicerflags $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp + \$(CC) -pipe -I../../include \$(NICEFLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp " } else -- cgit v1.2.3