From de5d2ea1584b01af809346316c7fbd4955a9db1d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 14 Apr 2010 10:06:07 -0400 Subject: [Makefile.am] Clean up CFLAGS handling, don't override all: target First, we should move the CFLAGS into AM_CFLAGS, otherwise the per-target CFLAGS forces Automake to prefix object files, which is unnecessary since we only have one target. More importantly, avoid overriding the all: target here; that's owned by Automake. Use all-local instead to append things to the end of the normal build. --- gi/Makefile.am | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gi/Makefile.am b/gi/Makefile.am index fad95ea..63f90e3 100644 --- a/gi/Makefile.am +++ b/gi/Makefile.am @@ -6,6 +6,9 @@ pkgpyexecdir = $(pyexecdir)/gtk-2.0 SUBDIRS = \ repository \ overrides +AM_CFLAGS = \ + $(PYTHON_INCLUDES) \ + $(GNOME_CFLAGS) pygidir = $(pkgpyexecdir)/gi pygi_PYTHON = \ @@ -14,9 +17,6 @@ pygi_PYTHON = \ importer.py \ __init__.py -_gi_la_CFLAGS = \ - $(PYTHON_INCLUDES) \ - $(GNOME_CFLAGS) _gi_la_LDFLAGS = \ -module \ -avoid-version \ @@ -43,10 +43,13 @@ _gi_la_SOURCES = \ pygi_LTLIBRARIES = _gi.la -.la.so: +# This is to ensure we have a symlink to the .so in the +# build directory, which the Python interpreter can load +# directly without having to know how to parse .la files. +_gi.so: _gi.la rm -f $@ && $(LN_S) .libs/$@ $@ -all: $(pygi_LTLIBRARIES:.la=.so) +all-local: _gi.so clean-local: - rm -f $(pygi_LTLIBRARIES:.la=.so) + rm -f _gi.so -- cgit