diff options
author | Colin Walters <walters@verbum.org> | 2010-04-14 10:06:07 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-04-14 10:06:07 -0400 |
commit | de5d2ea1584b01af809346316c7fbd4955a9db1d (patch) | |
tree | a302ba64a84d9b7f90ac6232f93956f7cd1b02f9 | |
parent | 5a47e96e3f580c973e6880dafa747f54c144c760 (diff) | |
download | pygi-de5d2ea1584b01af809346316c7fbd4955a9db1d.tar.gz pygi-de5d2ea1584b01af809346316c7fbd4955a9db1d.tar.xz pygi-de5d2ea1584b01af809346316c7fbd4955a9db1d.zip |
[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.
-rw-r--r-- | gi/Makefile.am | 15 |
1 files 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 |