rpm/Makefile.am

283 lines
8.5 KiB
Makefile

# Top level Makefile for rpm
ACLOCAL_AMFLAGS = -I m4
DISTCHECK_CONFIGURE_FLAGS = --with-external-db
include $(top_srcdir)/rpm.am
CLEANFILES =
EXTRA_DIST = CHANGES ChangeLog CREDITS GROUPS INSTALL \
autodeps autogen.sh \
db3/configure installplatform platform.in
BUILT_SOURCES =
SUBDIRS = po misc
if WITH_INTERNAL_DB
SUBDIRS += db3
endif
if WITH_LUAEXT
SUBDIRS += luaext
endif
SUBDIRS += rpmio lib build python scripts doc . tests
DIST_SUBDIRS = po misc luaext rpmio lib build python scripts doc tests
pkgconfigdir = $(libdir)/pkgconfig
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_NSS_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
AM_CPPFLAGS += -I$(top_srcdir)/misc
AM_CPPFLAGS += @WITH_LIBELF_INCLUDE@
AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\""
AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\""
pkginclude_HEADERS =
nodist_pkginclude_HEADERS =
pkginclude_HEADERS += rpmio/argv.h
pkginclude_HEADERS += rpmio/rpmio.h
pkginclude_HEADERS += rpmio/rpmurl.h
pkginclude_HEADERS += rpmio/rpmmacro.h
pkginclude_HEADERS += rpmio/rpmlog.h
pkginclude_HEADERS += rpmio/rpmpgp.h
pkginclude_HEADERS += rpmio/rpmsq.h
pkginclude_HEADERS += rpmio/rpmstring.h
pkginclude_HEADERS += rpmio/rpmsw.h
pkginclude_HEADERS += rpmio/rpmfileutil.h
pkginclude_HEADERS += rpmio/rpmutil.h
pkginclude_HEADERS += rpmio/rpmkeyring.h
pkginclude_HEADERS += lib/header.h
pkginclude_HEADERS += lib/rpmdb.h
pkginclude_HEADERS += lib/rpmcallback.h
pkginclude_HEADERS += lib/rpmcli.h
pkginclude_HEADERS += lib/rpmlib.h
pkginclude_HEADERS += lib/rpmds.h
pkginclude_HEADERS += lib/rpmfi.h
pkginclude_HEADERS += lib/rpmgi.h
pkginclude_HEADERS += lib/rpmlegacy.h
pkginclude_HEADERS += lib/rpmps.h
pkginclude_HEADERS += lib/rpmtag.h
pkginclude_HEADERS += lib/rpmtd.h
pkginclude_HEADERS += lib/rpmte.h
pkginclude_HEADERS += lib/rpmts.h
pkginclude_HEADERS += lib/rpmtypes.h
pkginclude_HEADERS += lib/rpmvf.h
pkginclude_HEADERS += build/rpmbuild.h
pkginclude_HEADERS += build/rpmfc.h
pkginclude_HEADERS += build/rpmspec.h
rpmbindir = `echo $(bindir) | $(SED) -e s,usr/bin,bin,`
rpmbin_PROGRAMS = rpm
bin_PROGRAMS = rpm2cpio rpmbuild
rpmlibexec_PROGRAMS =
rpmconfig_SCRIPTS = find-provides find-requires mkinstalldirs \
config.guess config.sub
DISTCLEANFILES = find-provides
DISTCLEANFILES += find-requires
rpm_SOURCES = rpmqv.c debug.h system.h
rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV
rpm_LDADD = build/librpmbuild.la lib/librpm.la rpmio/librpmio.la
rpm_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
rpmbuild_SOURCES = build.c rpmqv.c build.h debug.h system.h
rpmbuild_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMBT
rpmbuild_LDADD = build/librpmbuild.la lib/librpm.la rpmio/librpmio.la
rpmbuild_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
rpm2cpio_SOURCES = rpm2cpio.c debug.h system.h
rpm2cpio_LDADD = lib/librpm.la rpmio/librpmio.la
rpm2cpio_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
if LIBELF
if LIBDWARF
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@
endif
endif
rpmlibexec_PROGRAMS += javadeps
javadeps_SOURCES = tools/javadeps.c
javadeps_LDADD =
rpmlibexec_PROGRAMS += rpmdeps
rpmdeps_SOURCES = tools/rpmdeps.c
rpmdeps_LDADD = build/librpmbuild.la
bin_PROGRAMS += rpmgraph
rpmgraph_SOURCES = tools/rpmgraph.c
rpmgraph_LDADD = lib/librpm.la
dist_bin_SCRIPTS = scripts/gendiff
check_PROGRAMS = dumpdb
dumpdb_SOURCES = tools/dumpdb.c
dumpdb_LDADD = lib/librpm.la
check_PROGRAMS += rpminject
rpminject_SOURCES = tools/rpminject.c
rpminject_LDADD = build/librpmbuild.la
check_PROGRAMS += rpmsort
rpmsort_SOURCES = tools/rpmsort.c
rpmsort_LDADD = lib/librpm.la
rpmconfig_DATA = rpmrc
rpmrc: $(top_srcdir)/rpmrc.in
@$(SED) \
-e "s,[@]SYSCONFIGDIR[@],$(sysconfdir)/rpm,g" \
< $(top_srcdir)/rpmrc.in > rpmrc.tmp \
&& ( cd $(top_builddir) && ./config.status --file=${subdir}/rpmrc:${subdir}/rpmrc.tmp )
CLEANFILES += rpmrc.tmp rpmrc
EXTRA_DIST += rpmrc.in
rpmconfig_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
platform: $(top_srcdir)/platform.in
@$(SED) \
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
< $(top_srcdir)/platform.in > platform.tmp \
&& ( cd $(top_builddir) && ./config.status --file=${subdir}/platform:${subdir}/platform.tmp )
CLEANFILES += platform.tmp platform
EXTRA_DIST += platform.in
pkgconfig_DATA = rpm.pc
rpm.pc: $(top_srcdir)/rpm.pc.in
@$(SED) \
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
< $(top_srcdir)/rpm.pc.in > rpm.pc.tmp \
&& ( cd $(top_builddir) && ./config.status --file=${subdir}/rpm.pc:${subdir}/rpm.pc.tmp )
CLEANFILES += rpm.pc.tmp rpm.pc
EXTRA_DIST += rpm.pc.in
rpmconfig_DATA += rpmpopt-$(VERSION)
rpmpopt-@VERSION@: $(top_srcdir)/rpmpopt.in
@$(SED) \
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
< $(top_srcdir)/rpmpopt.in > rpmpopt-@VERSION@.tmp \
&& ( cd $(top_builddir) && ./config.status --file=${subdir}/rpmpopt-@VERSION@:${subdir}/rpmpopt-@VERSION@.tmp )
CLEANFILES += rpmpopt-@VERSION@.tmp rpmpopt-@VERSION@
EXTRA_DIST += rpmpopt.in
usrsrcdir = $(prefix)/src
rpmvardir = $(localstatedir)/lib/rpm
rpmvar_DATA =
install-exec-hook:
rm -f $(DESTDIR)$(bindir)/rpmquery
@LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmquery
rm -f $(DESTDIR)$(bindir)/rpmverify
@LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmverify
rm -f $(DESTDIR)$(bindir)/rpmsign
@LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmsign
rm -f $(DESTDIR)$(bindir)/rpmdb
@LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmdb
install-data-local:
@case "@host_os@" in \
solaris*|linux*|darwin*) \
DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" $(SHELL) $(top_srcdir)/installplatform rpmrc macros platform ;; \
esac
@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp
# XXX to appease distcheck we need to remove "stuff" here...
uninstall-local:
@rm -f $(DESTDIR)$(bindir)/rpmquery
@rm -f $(DESTDIR)$(bindir)/rpmsign
@rm -f $(DESTDIR)$(bindir)/rpmverify
@rm -f $(DESTDIR)$(bindir)/rpmdb
@rm -rf $(DESTDIR)$(rpmconfigdir)/platform/
MAINTAINERCLEANFILES = ChangeLog
# Build hacking docs only on request
if HACKINGDOCS
if DOXYGEN
doc/hacking.doxy: doc/hacking.doxy.in doc/hacking/Doxyheader Makefile.am
$(SED) \
-e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
-e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
-e "s,[@]PACKAGE[@],$(PACKAGE)," \
-e "s,[@]VERSION[@],$(VERSION)," \
< $(top_srcdir)/doc/hacking.doxy.in > doc/hacking.doxy
doc/hacking/html/index.html: doc/hacking.doxy rpmpopt-@VERSION@
@DOXYGEN@ doc/hacking.doxy
noinst_DATA += doc/hacking/html/index.html
endif
endif
EXTRA_DIST += doc/hacking.doxy.in doc/hacking/Doxyheader
# 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"`; \
$(SED) -e "s,[@]pkginclude_HEADERS[@],$$files," \
-e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
-e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
-e "s,[@]PACKAGE[@],$(PACKAGE)," \
-e "s,[@]VERSION[@],$(VERSION)," \
< $(top_srcdir)/doc/librpm.doxy.in > doc/librpm.doxy
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/html
if WITH_INTERNAL_DB
db.h: $(top_builddir)/db3/db.h
$(LN_S) $(top_builddir)/db3/db.h $@
BUILT_SOURCES += db.h
endif
DISTCLEANFILES += db.h
clean-local:
rm -rf doc/hacking/html
rm -rf include
distclean-local:
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 \
b=`basename $$f`; \
echo 'include/rpm/'$$b': '$$f' include/rpm/$$(dirstamp)' >> $(top_srcdir)/preinstall.am;\
echo ' $$(INSTALL_DATA) $$(top_srcdir)/'$$f' include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \
echo 'BUILT_SOURCES += include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \
echo 'CLEANFILES += include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \
done
include/rpm/$(dirstamp):
@$(MKDIR_P) include/rpm
@: > include/rpm/$(dirstamp)
include $(top_srcdir)/preinstall.am