RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm zlib lua Date: 27-Jun-2007 22:20:28
Branch: HEAD Handle: 2007062721202602
Modified files:
lua Makefile.am
rpm INSTALL Makefile.am acinclude.m4 configure.ac
rpm/build Makefile.am
rpm/lib Makefile.am
rpm/misc Makefile.am
rpm/rpmdb Makefile.am
rpm/rpmio Makefile.am
rpm/tools Makefile.am
zlib Makefile.am
Log:
Another "Build Environment Anti-Convolution Effort":
PART 1:
Finally revise the building against the _INTERNAL_ copies of third-party
libraries in order to circumvent the problem of extending CPPFLAGS,
LDFLAGS and LIBS in this particular case:
1. at "configure" time at least the library file (libfoo.a)
is still not existing, so extending LIBS with "-lfoo" would cause
following Autoconf checks to fail.
2. even deferring the extension of LIBS doesn't work, because although
this works around the problem under (1), it will fail if more than
one internal third-party library exists: LIBS would contain "-lfoo
-lbar" and on building "foo", "bar" usually still isn't built (or
vice versa). Hence, the linking of programs (tools, tests, etc) in
"foo" would fail.
3. information in at least LDFLAGS and LIBS is usually passed-through
to applications via xxx-config(1) scripts or pkg-config(1)
specifications. As the path to the internal copy is usually just a
temporary path, this will break there, too.
So, internal copies of third-party libraries inherently have to be
handled _explicitly_ by the build environment and for this we can only
provide the necessary information in dedicated per-library variables.
PART 2:
Additionally, the code of all internal third-party has to be _installed_
or librpm* would be useless in practice. For Berkeley-DB this is
achieved since a longer time by bundling its object files directly with
librpmdb. But for Lua, File and Zlib the same is required. As librpmdb
is not the best location for all of them and all third-party code
should be bundled together, after lots of thinking I've decided to use
librpmmisc for this purpose. Especially, because librpmmisc is already
a "bare container-style library" and it is at the leave of the library
dependency tree.
Finally, the problematic variable overides like "LIBS =" in a few
Makefile.am were completely eliminated by providing a $(LIBS)
independent linking target for the libraries.
RESULTS:
The resulting RPM libraries now look like this (notice the larger
librpmmisc*: it contains Berkeley-DB, Lua, File and ZLib here):
-rwxr-xr-x 515781 Jun 27 21:36 librpm-5.0.so
-rw-r--r-- 595346 Jun 27 21:36 librpm.a
-rwxr-xr-x 1448 Jun 27 21:36 librpm.la
lrwxr-xr-x 13 Jun 27 21:36 librpm.so -> librpm-5.0.so
-rwxr-xr-x 141717 Jun 27 21:36 librpmbuild-5.0.so
-rw-r--r-- 165622 Jun 27 21:36 librpmbuild.a
-rwxr-xr-x 1483 Jun 27 21:36 librpmbuild.la
lrwxr-xr-x 18 Jun 27 21:36 librpmbuild.so -> librpmbuild-5.0.so
-rwxr-xr-x 162454 Jun 27 21:36 librpmdb-5.0.so
-rw-r--r-- 172300 Jun 27 21:36 librpmdb.a
-rwxr-xr-x 1462 Jun 27 21:36 librpmdb.la
lrwxr-xr-x 15 Jun 27 21:36 librpmdb.so -> librpmdb-5.0.so
-rwxr-xr-x 302572 Jun 27 21:36 librpmio-5.0.so
-rw-r--r-- 323572 Jun 27 21:36 librpmio.a
-rwxr-xr-x 1462 Jun 27 21:36 librpmio.la
lrwxr-xr-x 15 Jun 27 21:36 librpmio.so -> librpmio-5.0.so
-rwxr-xr-x 1597583 Jun 27 21:36 librpmmisc-5.0.so
-rw-r--r-- 2030858 Jun 27 21:36 librpmmisc.a
-rwxr-xr-x 1577 Jun 27 21:36 librpmmisc.la
lrwxr-xr-x 17 Jun 27 21:36 librpmmisc.so -> librpmmisc-5.0.so
This way the convoluted linking against internal and external
third-party libraries was cleaned up. The only real "difference" to the
past is that the installed librpm* libraries no longer directly carry
(via ELF headers or GNU libtool *.la files) their dependencies (at least
the ELF headers cannot be used across platforms anyway). But as we now
provide a standard "rpm.pc" file, RPM based applications neither any
longer need those implicit dependencies nor do they have to know it
theirself. Instead the canonical and easy way to build against the RPM
5 API (while taking care of library ordering and external dependencies)
is:
CPPFLAGS = `pkg-config rpm --cflags-only-I`
CFLAGS = `pkg-config rpm --cflags-only-other`
LDFLAGS = `pkg-config rpm --libs-only-other`
LIBS = `pkg-config rpm --libs-only-l`
Summary:
Revision Changes Path
1.11 +8 -3 lua/Makefile.am
2.16 +7 -1 rpm/INSTALL
2.181 +10 -4 rpm/Makefile.am
2.13 +62 -40 rpm/acinclude.m4
2.63 +12 -11 rpm/build/Makefile.am
2.147 +1 -1 rpm/configure.ac
2.157 +12 -11 rpm/lib/Makefile.am
1.23 +14 -3 rpm/misc/Makefile.am
1.66 +16 -13 rpm/rpmdb/Makefile.am
1.90 +15 -7 rpm/rpmio/Makefile.am
2.91 +11 -2 rpm/tools/Makefile.am
1.22 +5 -5 zlib/Makefile.am
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: lua/Makefile.am
============================================================================
$ cvs diff -u -r1.10 -r1.11 Makefile.am
--- lua/Makefile.am 26 Jun 2007 12:57:15 -0000 1.10
+++ lua/Makefile.am 27 Jun 2007 20:20:26 -0000 1.11
@@ -11,14 +11,17 @@
local/userconfig.c \
local/linit.lua
-LDADD = liblua.la
-AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/local -I$(includedir)
+AM_CPPFLAGS = \
+ -I$(srcdir)/include \
+ -I$(srcdir)/local \
+ -I$(srcdir)
lua_lua_SOURCES = lua/lua.c
lua_lua_CFLAGS = -DLUA_USERCONFIG='"$(srcdir)/local/userconfig.c"'
-lua_lua_LDADD = $(LDADD) # -L/usr/lib -lncurses
+lua_lua_LDADD = liblua.la
luac_luac_SOURCES = luac/luac.c luac/print.c lopcodes.c
luac_luac_CFLAGS = -DLUA_OPNAMES
+luac_luac_LDADD = liblua.la
liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@ -DWITH_POSIX
liblua_la_LIBADD = @WITH_LUA_SUBDIR_LIB@ -lm
@@ -79,6 +82,8 @@
lvm.h \
lzio.c \
lzio.h
+liblua.la: $(liblua_la_OBJECTS) $(liblua_la_DEPENDENCIES)
+ $(liblua_la_LINK) $(liblua_la_OBJECTS) $(liblua_la_LIBADD)
local/linit.lch: local/linit.lua
bin2c local/linit.lua > local/linit.lch
@@ .
patch -p0 <<'@@ .'
Index: rpm/INSTALL
============================================================================
$ cvs diff -u -r2.15 -r2.16 INSTALL
--- rpm/INSTALL 27 Jun 2007 12:29:19 -0000 2.15
+++ rpm/INSTALL 27 Jun 2007 20:20:26 -0000 2.16
@@ -89,7 +89,13 @@
$ <prefix>/bin/rpm -qa
$ <prefix>/bin/rpm -e foo
- make dist
+Application Build-Time
+----------------------
+
+CPPFLAGS = `pkg-config rpm --cflags-only-I`
+CFLAGS = `pkg-config rpm --cflags-only-other`
+LDFLAGS = `pkg-config rpm --libs-only-other`
+LIBS = `pkg-config rpm --libs-only-l`
OS DEPENDENCIES
===============
@@ .
patch -p0 <<'@@ .'
Index: rpm/Makefile.am
============================================================================
$ cvs diff -u -r2.180 -r2.181 Makefile.am
--- rpm/Makefile.am 27 Jun 2007 10:04:33 -0000 2.180
+++ rpm/Makefile.am 27 Jun 2007 20:20:26 -0000 2.181
@@ -37,18 +37,26 @@
.
AM_CPPFLAGS = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
-I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
- -I$(top_srcdir)/misc
+ -I$(top_srcdir)/misc \
+ @WITH_DB_CPPFLAGS@ \
+ @WITH_ZLIB_CPPFLAGS@ \
+ @WITH_LUA_CPPFLAGS@ \
+ @WITH_FILE_CPPFLAGS@
myLDADD = \
$(top_builddir)/build/librpmbuild.la \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/misc/librpmmisc.la
+ $(top_builddir)/misc/librpmmisc.la \
+ @WITH_SELINUX_LIB@ \
+ @LTLIBINTL@
bin_PROGRAMS = rpm rpmbuild
@@ -70,8 +78,6 @@
rpmbuild.o: $(top_srcdir)/rpmqv.c
$(COMPILE) -DIAM_RPMBT -o $@ -c $<
-$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@
-
.PHONY: splint
splint:
splint \
@@ .
patch -p0 <<'@@ .'
Index: rpm/acinclude.m4
============================================================================
$ cvs diff -u -r2.12 -r2.13 acinclude.m4
--- rpm/acinclude.m4 25 Jun 2007 11:27:34 -0000 2.12
+++ rpm/acinclude.m4 27 Jun 2007 20:20:26 -0000 2.13
@@ -123,7 +123,12 @@
__rcl_result_hint=""
__rcl_location_$2=""
__rcl_location_last=""
- WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR=""
+ m4_if([$7],,, [
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR=""
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS=""
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS=""
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS=""
+ ])
AC_ARG_WITH($2,
AS_HELP_STRING([--with-$2=ARG], [build with $1 library (__rcl_default_enable) (location path: "__rcl_default_locations")]), [dnl
if test ".${with_$2}" != .no; then
@@ -144,46 +149,58 @@
if test -d __rcl_subdir; then
AC_MSG_VERBOSE([-- activating local sub-directory: __rcl_subdir])
AC_CONFIG_SUBDIRS(__rcl_subdir)
+ dnl # NOTICE: an internal copy of the third-party library is a tricky thing
+ dnl # because for the following two major reasons we cannot just extend
+ dnl # CPPFLAGS, LDFLAGS and LIBS in this case:
+ dnl # 1. at _this_ "configure" time at least the library file (libfoo.a)
+ dnl # is still not existing, so extending LIBS with "-lfoo" would cause
+ dnl # following Autoconf checks to fail.
+ dnl # 2. even deferring the extension of LIBS doesn't work, because although
+ dnl # this works around the problem under (1), it will fail if more than
+ dnl # one internal third-party library exists: LIBS would contains "-lfoo
+ dnl # -lbar" and if build "foo", "bar" usually still isn't built (or vice
+ dnl # versa). Hence, the linking of programs (tools, tests, etc) in "foo"
+ dnl # would fail.
+ dnl # 3. information in at least LDFLAGS and LIBS is usually passed-through
+ dnl # to applications via xxx-config(1) scripts or pkg-config(1)
+ dnl # specifications. As the path to the internal copy is usually just a
+ dnl # temporary path, this will break there, too.
+ dnl # So, internal copies of third-party libraries inherently have to be
+ dnl # handled explicitly by the build environment and for this we can only
+ dnl # provide the necessary information in dedicated per-library variables.
WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR="__rcl_subdir"
- dnl # divert deferred flags handling because in the "internal"
- dnl # case the library is (usually) still not existing and hence
- dnl # any arbitrary following Autoconf checks would fail.
__rcl_location_$2=internal
- AC_CONFIG_COMMANDS_PRE([
- if test ".${__rcl_location_$2}" = .internal; then
- AC_MSG_VERBOSE([++ post-adjustments for --with-$2 (${__rcl_location_$2})])
- __rcl_dirs_inc=`echo '$7' | sed -e 's/^[[^:]]*://' -e 's/:[[^:]]*[$]//'`
- __rcl_dirs_lib=`echo '$7' | sed -e 's/^[[^:]]*:[[^:]]*://'`
- __rcl_basedir="\[$](top_srcdir)/\[$](WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR)"
- __rcl_firstlib="m4_if(m4_index([$3], [ ]), -1, [$3], m4_substr([$3], 0, m4_index([$3], [ ])))"
- if test ".${__rcl_dirs_inc}" != ".$7"; then
- __rcl_IFS="${IFS}"; IFS=","
- for __rcl_dir in ${__rcl_dirs_inc}; do
- IFS="${__rcl_IFS}"
- test ".${__rcl_dir}" = . && continue
- AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_basedir}/${__rcl_dir}])
- CPPFLAGS="${CPPFLAGS} -I${__rcl_basedir}/${__rcl_dir}"
- done
- IFS="${__rcl_IFS}"
- fi
- AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_basedir}])
- CPPFLAGS="${CPPFLAGS} -I${__rcl_basedir}"
- if test ".${__rcl_dirs_lib}" != ".$7"; then
- __rcl_IFS="${IFS}"; IFS=","
- for __rcl_dir in ${__rcl_dirs_lib}; do
- IFS="${__rcl_IFS}"
- test ".${__rcl_dir}" = . && continue
- AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_basedir}/${__rcl_dir}])
- LDFLAGS="${LDFLAGS} -L${__rcl_basedir}/${__rcl_dir}"
- done
- IFS="${__rcl_IFS}"
- fi
- AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_basedir}])
- LDFLAGS="${LDFLAGS} -L${__rcl_basedir}"
- AC_MSG_VERBOSE([-- extending LIBS: -l${__rcl_firstlib}])
- LIBS="${LIBS} -l${__rcl_firstlib}"
- fi
- ])
+ AC_MSG_VERBOSE([++ post-adjustments for --with-$2 (${__rcl_location_$2})])
+ __rcl_dirs_inc=`echo '$7' | sed -e 's/^[[^:]]*://' -e 's/:[[^:]]*[$]//'`
+ __rcl_dirs_lib=`echo '$7' | sed -e 's/^[[^:]]*:[[^:]]*://'`
+ __rcl_basedir="\[$](top_srcdir)/\[$](WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR)"
+ __rcl_firstlib="m4_if(m4_index([$3], [ ]), -1, [$3], m4_substr([$3], 0, m4_index([$3], [ ])))"
+ if test ".${__rcl_dirs_inc}" != ".$7"; then
+ __rcl_IFS="${IFS}"; IFS=","
+ for __rcl_dir in ${__rcl_dirs_inc}; do
+ IFS="${__rcl_IFS}"
+ test ".${__rcl_dir}" = . && continue
+ AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_basedir}/${__rcl_dir}])
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_basedir}/${__rcl_dir}"
+ done
+ IFS="${__rcl_IFS}"
+ fi
+ AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_basedir}])
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_basedir}"
+ if test ".${__rcl_dirs_lib}" != ".$7"; then
+ __rcl_IFS="${IFS}"; IFS=","
+ for __rcl_dir in ${__rcl_dirs_lib}; do
+ IFS="${__rcl_IFS}"
+ test ".${__rcl_dir}" = . && continue
+ AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS: -L${__rcl_basedir}/${__rcl_dir}])
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS} -L${__rcl_basedir}/${__rcl_dir}"
+ done
+ IFS="${__rcl_IFS}"
+ fi
+ AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS: -L${__rcl_basedir}])
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS} -L${__rcl_basedir}"
+ AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS: -l${__rcl_firstlib}])
+ WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS} -l${__rcl_firstlib}"
__rcl_result_hint="internal: sub-directory __rcl_subdir"
break
else
@@ -400,7 +417,12 @@
fi
[WITH_]m4_translit([$2],[a-z],[A-Z])="${with_$2}"
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z]))
- AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR])
+ m4_if([$7],,, [
+ AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR])
+ AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_CPPFLAGS])
+ AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_LDFLAGS])
+ AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_LIBS])
+ ])
dnl # report results
AC_MSG_CHECKING(whether to build with $1 library)
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/Makefile.am
============================================================================
$ cvs diff -u -r2.62 -r2.63 Makefile.am
--- rpm/build/Makefile.am 27 Jun 2007 10:13:27 -0000 2.62
+++ rpm/build/Makefile.am 27 Jun 2007 20:20:26 -0000 2.63
@@ -6,14 +6,18 @@
EXTRA_DIST = librpmbuild.vers
-AM_CPPFLAGS = -I. \
+AM_CPPFLAGS = \
+ -I$(srcdir) \
-I$(top_srcdir) \
+ -I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
- -I$(top_srcdir)/misc
-
-LIBS =
+ -I$(top_srcdir)/misc \
+ @WITH_DB_CPPFLAGS@ \
+ @WITH_ZLIB_CPPFLAGS@ \
+ @WITH_LUA_CPPFLAGS@ \
+ @WITH_FILE_CPPFLAGS@
pkgincdir = $(pkgincludedir)
pkginc_HEADERS = rpmbuild.h rpmspec.h
@@ -26,16 +30,13 @@
parseBuildInstallClean.c parseChangelog.c parseDescription.c \
parseFiles.c parsePreamble.c parsePrep.c parseReqs.c parseScript.c \
parseSpec.c poptBT.c reqprov.c spec.c
-librpmbuild_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS)
-librpmbuild_la_LIBADD = \
- $(top_builddir)/lib/librpm.la \
- $(top_builddir)/rpmdb/librpmdb.la \
- $(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/misc/librpmmisc.la
-
+librpmbuild_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
librpmbuild_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpmbuild.vers
endif
+librpmbuild_la_LIBADD =
+librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES)
+ $(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD)
clean-local:
rm -f *.o # .created $(FILELOBJS)
@@ .
patch -p0 <<'@@ .'
Index: rpm/configure.ac
============================================================================
$ cvs diff -u -r2.146 -r2.147 configure.ac
--- rpm/configure.ac 27 Jun 2007 12:24:44 -0000 2.146
+++ rpm/configure.ac 27 Jun 2007 20:20:26 -0000 2.147
@@ -733,7 +733,7 @@
DBLIBSRCS=""
RPM_CHECK_LIB(
[Berkeley-DB], [db],
- [db], [db_create], [db.h],
+ [db-4.5 db], [db_create], [db.h],
[yes,internal:external], [db3],
[ DBLIBSRCS="$DBLIBSRCS db3.c"
if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/Makefile.am
============================================================================
$ cvs diff -u -r2.156 -r2.157 Makefile.am
--- rpm/lib/Makefile.am 27 Jun 2007 10:13:28 -0000 2.156
+++ rpm/lib/Makefile.am 27 Jun 2007 20:20:26 -0000 2.157
@@ -4,12 +4,18 @@
LINT = splint
-AM_CPPFLAGS = -I. \
+AM_CPPFLAGS = \
+ -I$(srcdir) \
-I$(top_srcdir) \
-I$(top_srcdir)/build \
+ -I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
- -I$(top_srcdir)/misc
+ -I$(top_srcdir)/misc \
+ @WITH_DB_CPPFLAGS@ \
+ @WITH_ZLIB_CPPFLAGS@ \
+ @WITH_LUA_CPPFLAGS@ \
+ @WITH_FILE_CPPFLAGS@
EXTRA_DIST = getdate.y librpm.vers
@@ -24,7 +30,6 @@
cpio.h fsm.h manifest.h psm.h rpmlead.h rpmlock.h signature.h tar.h
mylibs = librpm.la
-LIBS =
usrlibdir = $(libdir)@MARK64@
usrlib_LTLIBRARIES = librpm.la
@@ -37,17 +42,13 @@
rpmlead.c rpmlock.c rpmns.c rpmps.c rpmrc.c rpmsx.c rpmte.c rpmts.c \
signature.c stringbuf.c transaction.c \
verify.c tar.c
-librpm_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS)
-librpm_la_LIBADD = \
- $(top_builddir)/rpmdb/librpmdb.la \
- $(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/misc/librpmmisc.la \
- @WITH_SELINUX_LIB@ \
- @LTLIBINTL@
-
+librpm_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
librpm_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpm.vers
endif
+librpm_la_LIBADD =
+librpm.la: $(librpm_la_OBJECTS) $(librpm_la_DEPENDENCIES)
+ $(librpm_la_LINK) -rpath $(usrlibdir) $(librpm_la_OBJECTS) $(librpm_la_LIBADD)
getdate.c: getdate.y
@echo expect 10 shift/reduce conflicts
@@ .
patch -p0 <<'@@ .'
Index: rpm/misc/Makefile.am
============================================================================
$ cvs diff -u -r1.22 -r1.23 Makefile.am
--- rpm/misc/Makefile.am 27 Jun 2007 09:45:15 -0000 1.22
+++ rpm/misc/Makefile.am 27 Jun 2007 20:20:27 -0000 1.23
@@ -2,7 +2,9 @@
AUTOMAKE_OPTIONS = 1.4 foreign
-AM_CPPFLAGS = -I. -I$(top_srcdir)
+AM_CPPFLAGS = \
+ -I$(srcdir) \
+ -I$(top_srcdir)
EXTRA_DIST = \
alloca.c basename.c err.c error.c \
@@ -21,6 +23,15 @@
usrlib_LTLIBRARIES = librpmmisc.la
librpmmisc_la_SOURCES = librpmmisc.c
-librpmmisc_la_LIBADD = @ALLOCA@
-librpmmisc_la_DEPENDENCIES = $(librpmmisc_la_LIBADD)
+librpmmisc_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
+librpmmisc_la_LIBADD = \
+ @ALLOCA@ \
+ @WITH_DB_LDFLAGS@ @WITH_DB_LIBS@ \
+ @WITH_ZLIB_LDFLAGS@ @WITH_ZLIB_LIBS@ \
+ @WITH_LUA_LDFLAGS@ @WITH_LUA_LIBS@ \
+ @WITH_FILE_LDFLAGS@ @WITH_FILE_LIBS@
+librpmmisc_la_DEPENDENCIES = \
+ @ALLOCA@
+librpmmisc.la: $(librpmmisc_la_OBJECTS) $(librpmmisc_la_DEPENDENCIES)
+ $(librpmmisc_la_LINK) -rpath $(usrlibdir) $(librpmmisc_la_OBJECTS) $(librpmmisc_la_LIBADD)
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/Makefile.am
============================================================================
$ cvs diff -u -r1.65 -r1.66 Makefile.am
--- rpm/rpmdb/Makefile.am 27 Jun 2007 19:20:45 -0000 1.65
+++ rpm/rpmdb/Makefile.am 27 Jun 2007 20:20:27 -0000 1.66
@@ -4,12 +4,18 @@
LINT = splint
-AM_CPPFLAGS = -I. \
+AM_CPPFLAGS = \
+ -I$(srcdir) \
-I$(top_srcdir) \
-I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
+ -I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
- -I$(top_srcdir)/misc
+ -I$(top_srcdir)/misc \
+ @WITH_DB_CPPFLAGS@ \
+ @WITH_ZLIB_CPPFLAGS@ \
+ @WITH_LUA_CPPFLAGS@ \
+ @WITH_FILE_CPPFLAGS@
EXTRA_DIST = db3.c sqlite.c db_emu.h librpmdb.vers
@@ -42,9 +48,9 @@
db_svc
endif
-mylibs = librpmdb.la
-
-LIBS =
+mylibs = \
+ $(top_builddir)/rpmdb/librpmdb.la \
+ $(top_builddir)/misc/librpmmisc.la
usrlibdir = $(libdir)@MARK64@
usrlib_LTLIBRARIES = librpmdb.la
@@ -53,17 +59,14 @@
hdrNVR.c header.c header_internal.c legacy.c merge.c \
poptDB.c rpmdb.c \
tagname.c tagtbl.c
-librpmdb_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION)
-librpmdb_la_LIBADD = \
- $(DBLIBOBJS) \
- $(top_builddir)/$(WITH_DB_SUBDIR)/libdb-4.5.la \
- $(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/misc/librpmmisc.la
-librpmdb_la_DEPENDENCIES = $(DBLIBOBJS)
-
+librpmdb_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
librpmdb_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpmdb.vers
endif
+librpmdb_la_LIBADD = $(DBLIBOBJS)
+librpmdb_la_DEPENDENCIES = $(DBLIBOBJS)
+librpmdb.la: $(librpmdb_la_OBJECTS) $(librpmdb_la_DEPENDENCIES)
+ $(librpmdb_la_LINK) -rpath $(usrlibdir) $(librpmdb_la_OBJECTS) $(librpmdb_la_LIBADD)
# XXX make sure that db.h symlink is generated
dbconfig.c $(DBLIBSRCS): db.h
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/Makefile.am
============================================================================
$ cvs diff -u -r1.89 -r1.90 Makefile.am
--- rpm/rpmio/Makefile.am 27 Jun 2007 10:13:28 -0000 1.89
+++ rpm/rpmio/Makefile.am 27 Jun 2007 20:20:27 -0000 1.90
@@ -8,9 +8,18 @@
EXTRA_PROGRAMS = tax tdir tfts tget thkp tmacro tput tglob tinv tkey trpmio tsw dumpasn1 lookup3
-AM_CPPFLAGS = -I. \
+AM_CPPFLAGS = \
+ -I$(srcdir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/misc
+ -I$(top_srcdir)/build \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/rpmdb \
+ -I$(top_srcdir)/rpmio \
+ -I$(top_srcdir)/misc \
+ @WITH_DB_CPPFLAGS@ \
+ @WITH_ZLIB_CPPFLAGS@ \
+ @WITH_LUA_CPPFLAGS@ \
+ @WITH_FILE_CPPFLAGS@
pkgincdir = $(pkgincludedir)
pkginc_HEADERS = \
@@ -32,14 +41,13 @@
rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c strtolocale.c \
url.c ugid.c \
LzmaDecode.c
-librpmio_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS)
-librpmio_la_LIBADD = \
- $(top_builddir)/misc/librpmmisc.la \
- @LTLIBINTL@
-
+librpmio_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
librpmio_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpmio.vers
endif
+librpmio_la_LIBADD =
+librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES)
+ $(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD)
#BUILT_SOURCES = rpmio.lcd
@@ .
patch -p0 <<'@@ .'
Index: rpm/tools/Makefile.am
============================================================================
$ cvs diff -u -r2.90 -r2.91 Makefile.am
--- rpm/tools/Makefile.am 26 Jun 2007 18:19:09 -0000 2.90
+++ rpm/tools/Makefile.am 27 Jun 2007 20:20:27 -0000 2.91
@@ -13,16 +13,25 @@
EXTRA_PROGRAMS = debugedit convertdb1
-LDADD = $(top_builddir)/lib/librpm.la
+myLDADD = \
+ $(top_builddir)/build/librpmbuild.la \
+ $(top_builddir)/lib/librpm.la \
+ $(top_builddir)/rpmdb/librpmdb.la \
+ $(top_builddir)/rpmio/librpmio.la \
+ $(top_builddir)/misc/librpmmisc.la \
+ @WITH_SELINUX_LIB@ \
+ @LTLIBINTL@
pkglibdir = @USRLIBRPM@
versionlibdir = $(pkglibdir)/@VERSION@
versionlib_PROGRAMS = rpmdeps @WITH_LIBELF_DEBUGEDIT@
convertdb1_SOURCES = convertdb1.c
+convertdb1_LDADD = $(myLDADD)
debugedit_SOURCES = debugedit.c hashtab.c
+debugedit_LDADD = $(myLDADD)
rpmdeps_SOURCES = rpmdeps.c
+rpmdeps_LDADD = $(myLDADD)
-$(PROGRAMS): $(LDADD)
@@ .
patch -p0 <<'@@ .'
Index: zlib/Makefile.am
============================================================================
$ cvs diff -u -r1.21 -r1.22 Makefile.am
--- zlib/Makefile.am 25 May 2007 17:36:42 -0000 1.21
+++ zlib/Makefile.am 27 Jun 2007 20:20:28 -0000 1.22
@@ -15,20 +15,20 @@
adler32.c compress.c crc32.c deflate.c gzio.c \
infback.c inffast.c inflate.c inftrees.c \
trees.c uncompr.c zutil.c
+libz_la_LDFLAGS =
+libz.la: $(libz_la_OBJECTS) $(libz_la_DEPENDENCIES)
+ $(libz_la_LINK) $(libz_la_OBJECTS) $(libz_la_LIBADD)
noinst_PROGRAMS = example minigzip
example_SOURCES = example.c
-example_LDFLAGS = .libs/libz.a
+example_LDFLAGS = libz.la
minigzip_SOURCES = minigzip.c
-minigzip_LDFLAGS = .libs/libz.a
+minigzip_LDFLAGS = libz.la
BUILT_SOURCES = # Doxyfile zlib.lcd
-.libs/libz.a:
- [ ! -f .libs/libz.a -a -f .libs/libz.al ] && ln -s libz.al .libs/libz.a
-
zlib.lcd: Makefile.am ${libz_la_SOURCES} ${noinst_HEADERS}
-lclint ${DEFS} ${INCLUDES} ${libz_la_SOURCES} -dump $@ 2>/dev/null
@@ .
Received on Wed Jun 27 22:20:28 2007