public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: 'normalization' of libmudflap Makefile.am
@ 2007-07-14 21:47 Tom Tromey
  2007-07-27  2:09 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2007-07-14 21:47 UTC (permalink / raw)
  To: gcc-patches List

I happened to notice that libmudflap's Makefile.am implemented its own
form of per-library CFLAGS.  I think it is slightly better to use
Automake's built-in approach to this, since it means that dependency
tracking will work properly.

This patch implements this idea.

Tested on x86 FC6.  I ran 'make check' in libmudflap's build directory
with no regressions.  Ok?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Makefile.in: Rebuilt.
	* Makefile.am (clean-local): Removed.
	(pth/mf-runtime.lo, pth/mf-heuristics.lo, pth/mf-hooks1.lo,
	pth/mf-hooks2.lo, pth/mf-hooks3.lo): Likewise.
	(libmudflapth_la_SOURCES): List sources.
	(libmudflapth_la_LIBADD): Clear.
	(libmudflapth_la_CFLAGS): New variable.

Index: Makefile.am
===================================================================
--- Makefile.am	(revision 126605)
+++ Makefile.am	(working copy)
@@ -1,6 +1,6 @@
 ## Makefile for the toplevel directory of the mudflap library.
 ##
-## Copyright (C) 2002, 2003, 2004
+## Copyright (C) 2002, 2003, 2004, 2007
 ## Free Software Foundation, Inc.
 ##
 
@@ -36,28 +36,15 @@
 libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
 libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
 
-clean-local:
-	rm -f pth/*.o pth/*.lo
 
-pth/mf-runtime.lo: mf-runtime.c mf-runtime.h mf-impl.h
-	$(LTCOMPILE) -DLIBMUDFLAPTH -c $(srcdir)/mf-runtime.c -o $@
-pth/mf-heuristics.lo: mf-heuristics.c mf-runtime.h mf-impl.h
-	$(LTCOMPILE) -DLIBMUDFLAPTH -c $(srcdir)/mf-heuristics.c -o $@
-pth/mf-hooks1.lo: mf-hooks1.c mf-runtime.h mf-impl.h
-	$(LTCOMPILE) -DLIBMUDFLAPTH -c $(srcdir)/mf-hooks1.c -o $@
-pth/mf-hooks2.lo: mf-hooks2.c mf-runtime.h mf-impl.h
-	$(LTCOMPILE) -DLIBMUDFLAPTH -c $(srcdir)/mf-hooks2.c -o $@
-pth/mf-hooks3.lo: mf-hooks3.c mf-runtime.h mf-impl.h
-	$(LTCOMPILE) -DLIBMUDFLAPTH -c $(srcdir)/mf-hooks3.c -o $@
-
-
-libmudflapth_la_SOURCES =
-libmudflapth_la_LIBADD = \
-	pth/mf-runtime.lo \
-	pth/mf-heuristics.lo \
-	pth/mf-hooks1.lo \
-	pth/mf-hooks2.lo \
-	pth/mf-hooks3.lo
+libmudflapth_la_SOURCES = \
+	mf-runtime.c \
+	mf-heuristics.c \
+	mf-hooks1.c \
+	mf-hooks2.c \
+	mf-hooks3.c
+libmudflapth_la_CFLAGS = -DLIBMUDFLAPTH
+libmudflapth_la_LIBADD =
 libmudflapth_la_DEPENDENCIES = $(libmudflapth_la_LIBADD)
 libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch: 'normalization' of libmudflap Makefile.am
  2007-07-14 21:47 Patch: 'normalization' of libmudflap Makefile.am Tom Tromey
@ 2007-07-27  2:09 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-07-27  2:09 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches List

Tom Tromey <tromey@redhat.com> writes:

> >From  Tom Tromey  <tromey@redhat.com>
> 
> 	* Makefile.in: Rebuilt.
> 	* Makefile.am (clean-local): Removed.
> 	(pth/mf-runtime.lo, pth/mf-heuristics.lo, pth/mf-hooks1.lo,
> 	pth/mf-hooks2.lo, pth/mf-hooks3.lo): Likewise.
> 	(libmudflapth_la_SOURCES): List sources.
> 	(libmudflapth_la_LIBADD): Clear.
> 	(libmudflapth_la_CFLAGS): New variable.

This is OK.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-27  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-14 21:47 Patch: 'normalization' of libmudflap Makefile.am Tom Tromey
2007-07-27  2:09 ` Ian Lance Taylor

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).