summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am110
1 files changed, 78 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am
index d2074fae4..77fe7eec2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,14 +2,14 @@
ACLOCAL_AMFLAGS = -I m4
-DISTCHECK_CONFIGURE_FLAGS = --with-external-db
+DISTCHECK_CONFIGURE_FLAGS = --with-external-db --enable-python --enable-zstd
include $(top_srcdir)/rpm.am
+AM_CFLAGS = @RPMCFLAGS@
CLEANFILES =
-EXTRA_DIST = CHANGES ChangeLog CREDITS GROUPS INSTALL \
- autodeps autogen.sh \
- db3/configure installplatform platform.in
+EXTRA_DIST = ChangeLog CREDITS INSTALL \
+ autogen.sh db3/configure installplatform platform.in
BUILT_SOURCES =
SUBDIRS = po misc
@@ -41,7 +41,9 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += -I$(top_srcdir)/build
AM_CPPFLAGS += -I$(top_srcdir)/lib
AM_CPPFLAGS += -I$(top_srcdir)/rpmio
+AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
+AM_CPPFLAGS += @WITH_OPENSSL_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
AM_CPPFLAGS += -I$(top_srcdir)/misc
AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\""
@@ -72,6 +74,7 @@ pkginclude_HEADERS += lib/rpmcli.h
pkginclude_HEADERS += lib/rpmlib.h
pkginclude_HEADERS += lib/rpmds.h
pkginclude_HEADERS += lib/rpmfi.h
+pkginclude_HEADERS += lib/rpmfiles.h
pkginclude_HEADERS += lib/rpmlegacy.h
pkginclude_HEADERS += lib/rpmpol.h
pkginclude_HEADERS += lib/rpmps.h
@@ -82,6 +85,7 @@ pkginclude_HEADERS += lib/rpmte.h
pkginclude_HEADERS += lib/rpmts.h
pkginclude_HEADERS += lib/rpmtypes.h
pkginclude_HEADERS += lib/rpmvf.h
+pkginclude_HEADERS += lib/rpmarchive.h
pkginclude_HEADERS += sign/rpmsign.h
@@ -95,12 +99,13 @@ rpmbin_PROGRAMS = rpm
bin_PROGRAMS = rpm2cpio rpmbuild rpmdb rpmkeys rpmsign rpmspec
+if WITH_ARCHIVE
+bin_PROGRAMS += rpm2archive
+endif
+
rpmlibexec_PROGRAMS =
-rpmconfig_SCRIPTS = autodeps/find-provides autodeps/find-requires \
- mkinstalldirs \
+rpmconfig_SCRIPTS = mkinstalldirs \
config.guess config.sub
-DISTCLEANFILES = autodeps/find-provides
-DISTCLEANFILES += autodeps/find-requires
noinst_LTLIBRARIES = libcliutils.la
libcliutils_la_SOURCES = cliutils.h cliutils.c
@@ -112,56 +117,85 @@ rpm_SOURCES = rpmqv.c debug.h system.h
rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMEIU -DIAM_RPMQ -DIAM_RPMV
rpm_LDADD = libcliutils.la
rpm_LDADD += lib/librpm.la rpmio/librpmio.la
-rpm_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+
+rpm_LDADD += @WITH_POPT_LIB@
+rpm_CFLAGS = $(CFLAGS) -fPIE
+rpm_LDFLAGS = $(LDFLAGS) -pie
+
rpmdb_SOURCES = rpmdb.c debug.h system.h
rpmdb_CPPFLAGS = $(AM_CPPFLAGS)
rpmdb_LDADD = libcliutils.la
rpmdb_LDADD += lib/librpm.la rpmio/librpmio.la
-rpmdb_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+
+rpmdb_LDADD += @WITH_POPT_LIB@
+rpmdb_CFLAGS = $(CFLAGS) -fPIE
+rpmdb_LDFLAGS = $(LDFLAGS) -pie
+
rpmkeys_SOURCES = rpmkeys.c debug.h system.h
rpmkeys_CPPFLAGS = $(AM_CPPFLAGS)
rpmkeys_LDADD = libcliutils.la
rpmkeys_LDADD += lib/librpm.la rpmio/librpmio.la
-rpmkeys_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+
+rpmkeys_LDADD += @WITH_POPT_LIB@
+rpmkeys_CFLAGS = $(CFLAGS) -fPIE
+rpmkeys_LDFLAGS = $(LDFLAGS) -pie
rpmsign_SOURCES = rpmsign.c debug.h system.h
rpmsign_CPPFLAGS = $(AM_CPPFLAGS)
rpmsign_LDADD = libcliutils.la
rpmsign_LDADD += sign/librpmsign.la lib/librpm.la rpmio/librpmio.la
-rpmsign_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+rpmsign_LDADD += @WITH_POPT_LIB@
rpmbuild_SOURCES = rpmbuild.c debug.h system.h
rpmbuild_CPPFLAGS = $(AM_CPPFLAGS)
rpmbuild_LDADD = libcliutils.la
rpmbuild_LDADD += build/librpmbuild.la lib/librpm.la rpmio/librpmio.la
-rpmbuild_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+rpmbuild_LDADD += @WITH_POPT_LIB@
rpmspec_SOURCES = rpmspec.c debug.h system.h
rpmspec_CPPFLAGS = $(AM_CPPFLAGS)
rpmspec_LDADD = libcliutils.la
rpmspec_LDADD += build/librpmbuild.la lib/librpm.la rpmio/librpmio.la
-rpmspec_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+rpmspec_LDADD += @WITH_POPT_LIB@
rpm2cpio_SOURCES = rpm2cpio.c debug.h system.h
rpm2cpio_LDADD = lib/librpm.la rpmio/librpmio.la
-rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
+rpm2cpio_LDADD += @WITH_POPT_LIB@
+rpm2cpio_CFLAGS = $(CFLAGS) -fPIE
+rpm2cpio_LDFLAGS = $(LDFLAGS) -pie
+
+rpm2archive_SOURCES = rpm2archive.c debug.h system.h
+rpm2archive_LDADD = lib/librpm.la rpmio/librpmio.la
+rpm2archive_LDADD += @WITH_POPT_LIB@ @WITH_ARCHIVE_LIB@
if LIBELF
+if LIBDW
+
rpmconfig_SCRIPTS += scripts/find-debuginfo.sh
rpmlibexec_PROGRAMS += debugedit
debugedit_SOURCES = tools/debugedit.c tools/hashtab.c tools/hashtab.h
debugedit_LDADD = rpmio/librpmio.la
debugedit_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
-
+if HAVE_LIBDW_STRTAB
+debugedit_LDADD += @WITH_LIBDW_LIB@
+else
+debugedit_LDADD += @WITH_LIBDW_LIB@ -lebl
+endif # HAVE_LIBDW_STRTAB
+endif # LIBDW
rpmlibexec_PROGRAMS += elfdeps
elfdeps_SOURCES = tools/elfdeps.c
elfdeps_LDADD = rpmio/librpmio.la
elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
-endif
+
+rpmlibexec_PROGRAMS += sepdebugcrcfix
+sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
+sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@
+
+endif #LIBELF
rpmlibexec_PROGRAMS += rpmdeps
rpmdeps_SOURCES = tools/rpmdeps.c
@@ -175,7 +209,9 @@ dist_bin_SCRIPTS = scripts/gendiff
bin_PROGRAMS += rpmqpack
rpmqpack_SOURCES = rpmqpack.c
-rpmqpack_LDADD = lib/librpm.la @WITH_DB_LIB@
+rpmqpack_LDADD = lib/librpm.la
+rpmqpack_CFLAGS = $(CFLAGS) -fPIE
+rpmqpack_LDFLAGS = $(LDFLAGS) -pie
rpmconfig_DATA = rpmrc
rpmrc: $(top_srcdir)/rpmrc.in
@@ -186,13 +222,16 @@ rpmrc: $(top_srcdir)/rpmrc.in
CLEANFILES += rpmrc.tmp rpmrc
EXTRA_DIST += rpmrc.in
-rpmconfig_DATA += macros
+noinst_DATA = macros
macros: $(top_srcdir)/macros.in
( cd $(top_builddir) && ./config.status --file=${subdir}/macros:${subdir}/macros.in )
CLEANFILES += macros
EXTRA_DIST += macros.in
-noinst_DATA = platform
+# Used for the testsuite to test creating debuginfo packages
+EXTRA_DIST += macros.debug
+
+noinst_DATA += platform
platform: $(top_srcdir)/platform.in
@$(SED) \
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
@@ -227,29 +266,32 @@ rpmvar_DATA =
install-exec-hook:
@rm -f $(DESTDIR)$(bindir)/rpmquery
- @LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmquery
+ @LN_S@ $(rpm_symlink_prefix)rpm $(DESTDIR)$(bindir)/rpmquery
@rm -f $(DESTDIR)$(bindir)/rpmverify
- @LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmverify
+ @LN_S@ $(rpm_symlink_prefix)rpm $(DESTDIR)$(bindir)/rpmverify
install-data-local:
DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" \
$(SHELL) $(top_srcdir)/installplatform \
- rpmrc platform \
+ rpmrc platform macros \
$(RPMCANONVENDOR) $(RPMCANONOS) $(RPMCANONGNU)
@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp
+ @$(MKDIR_P) $(DESTDIR)$(rpmconfigdir)/macros.d
# XXX to appease distcheck we need to remove "stuff" here...
uninstall-local:
@rm -f $(DESTDIR)$(bindir)/rpmquery
@rm -f $(DESTDIR)$(bindir)/rpmverify
@rm -rf $(DESTDIR)$(rpmconfigdir)/platform/
+ @rm -f $(DESTDIR)$(rpmconfigdir)/macros
+ @rm -rf $(DESTDIR)$(rpmconfigdir)/macros.d
MAINTAINERCLEANFILES = ChangeLog
# Build hacking docs only on request
if HACKINGDOCS
if DOXYGEN
-doc/hacking.doxy: doc/hacking.doxy.in doc/hacking/Doxyheader Makefile.am
+doc/hacking.doxy: doc/hacking.doxy.in doc/hacking/Doxyheader.h Makefile.am
$(SED) \
-e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
-e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
@@ -262,12 +304,12 @@ doc/hacking/html/index.html: doc/hacking.doxy rpmpopt-@VERSION@
noinst_DATA += doc/hacking/html/index.html
endif
endif
-EXTRA_DIST += doc/hacking.doxy.in doc/hacking/Doxyheader
+EXTRA_DIST += doc/hacking.doxy.in doc/hacking/Doxyheader.h
# Always build librpm docs
if DOXYGEN
-doc/librpm.doxy: doc/librpm.doxy.in doc/librpm/Doxyheader Makefile.am $(pkginclude_HEADERS)
- files=`echo " $(HEADERS)" | $(SED) -e "s, , \@top_srcdir\@/,g"`; \
+doc/librpm.doxy: doc/librpm.doxy.in doc/librpm/Doxyheader.h Makefile.am configure.ac $(pkginclude_HEADERS)
+ files=`echo " $(pkginclude_HEADERS)" | $(SED) -e "s, , \@top_srcdir\@/,g"`; \
$(SED) -e "s,[@]pkginclude_HEADERS[@],$$files," \
-e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
-e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
@@ -279,7 +321,7 @@ doc/librpm/html/index.html: doc/librpm.doxy
@DOXYGEN@ doc/librpm.doxy
noinst_DATA += doc/librpm/html/index.html
endif
-EXTRA_DIST += doc/librpm.doxy.in doc/librpm/Doxyheader
+EXTRA_DIST += doc/librpm.doxy.in doc/librpm/Doxyheader.h
EXTRA_DIST += doc/librpm/html
if WITH_INTERNAL_DB
@@ -287,19 +329,23 @@ db.h: $(top_builddir)/db3/db.h
$(LN_S) $(top_builddir)/db3/db.h $@
BUILT_SOURCES += db.h
endif
-DISTCLEANFILES += db.h
+DISTCLEANFILES = db.h
+
+ChangeLog:
+ touch ChangeLog
+
+dist-hook:
+ if [ -d .git ] && [ -x $(command -v git) ]; then git log --no-merges > $(distdir)/ChangeLog; fi
clean-local:
rm -rf doc/hacking/html
rm -rf include
distclean-local:
+ rm -rf doc/librpm.doxy doc/librpm/html
rm -rf Doxytags
rm -f stamp-h.in db3/*.orig db3/db3lobjs
-maintainer-clean-local:
- rm -rf doc/librpm/html
-
$(top_srcdir)/preinstall.am: Makefile.am
rm -f $(top_srcdir)/preinstall.am
@for f in $(HEADERS); do \