public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 make.tmpl.in
Date: Wed, 23 Nov 2011 12:19:00 -0000	[thread overview]
Message-ID: <20111123121924.31341.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-11-23 12:19:24

Modified files:
	.              : make.tmpl.in 

Log message:
	Split gcc warning options
	
	Use gcc warning options only for .c -> .o compilation
	So it makes the output more clear.
	
	Do not use INCLUDES and DEFS for .o -> .so.
	
	Do not use CFLAGS for deps .d generation.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/make.tmpl.in.diff?cvsroot=lvm2&r1=1.126&r2=1.127

--- LVM2/make.tmpl.in	2011/11/23 12:18:42	1.126
+++ LVM2/make.tmpl.in	2011/11/23 12:19:23	1.127
@@ -113,13 +113,16 @@
 
 .SUFFIXES: .c .d .o .so .a .po .pot .mo .dylib
 
-CFLAGS += -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith
+WFLAGS += -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings \
+ -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
+ -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls \
+ -Wpointer-arith
+
+#WFLAGS += -W -Wconversion -Wbad-function-cast -Wcast-qual
+#WFLAGS += -pedantic -std=gnu99
+#DEFS += -DDEBUG_CRC32
 
-#CFLAGS += -W -Wconversion -Wbad-function-cast -Wcast-qual
-#CFLAGS += -pedantic -std=gnu99
-#CFLAGS += -DDEBUG_CRC32
-
-CFLAGS += @COPTIMISE_FLAG@
+CFLAGS += -fPIC  @COPTIMISE_FLAG@
 LDFLAGS += @COPTIMISE_FLAG@
 
 ifeq ("@DEBUG@", "yes")
@@ -303,14 +306,14 @@
 $(TARGETS): $(OBJECTS)
 
 %.o: %.c
-	$(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $< -o $@
+	$(CC) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CFLAGS) $< -o $@
 
 %.pot: %.c Makefile
 	$(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
-		$(DEFS) $(CFLAGS) $< > $@
+		$(DEFS) $(WFLAGS) $(CFLAGS) $< > $@
 
 %.so: %.o
-	$(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
+	$(CC) -c $(CFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
 
 ifneq (,$(LIB_SHARED))
 
@@ -355,7 +358,7 @@
 	set -e; \
 	FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
 	DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
-	$(CC) -MM $(INCLUDES) $(DEFS) $(CFLAGS) -o $@ $<; \
+	$(CC) -MM $(INCLUDES) $(DEFS) -o $@ $<; \
 	sed -i "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" $@; \
 	[ -s $@ ] || $(RM) $@
 
@@ -378,8 +381,8 @@
 	set -e; \
 	( cat $(srcdir)/.exported_symbols; \
 	  if test x$(EXPORTED_HEADER) != x; then \
-        	$(CC) -E -P $(INCLUDES) $(DEFS) $(CFLAGS) $(EXPORTED_HEADER) | \
-        	$(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
+		$(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
+		$(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
 	  fi \
 	) > $@
 


             reply	other threads:[~2011-11-23 12:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 12:19 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23 13:31 mornfall
2012-02-13 17:31 prajnoha
2011-11-23 12:18 zkabelac
2011-08-12 12:56 agk
2011-08-12  7:57 mbroz
2010-08-16 17:49 agk
2010-05-20 22:54 agk
2010-05-14 13:32 zkabelac
2010-05-11  8:43 zkabelac
2010-04-08  9:15 zkabelac
2010-01-22 13:20 mbroz
2009-10-09 15:55 agk
2008-10-31 22:33 agk
2005-10-25 19:04 agk
2004-03-17 19:37 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111123121924.31341.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).