1 # Top level Makefile for rpm
3 AUTOMAKE_OPTIONS = 1.4 foreign
5 EXTRA_DIST = CHANGES CREDITS GROUPS README.amiga INSTALL RPM-PGP-KEY \
6 autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
7 docs/[a-z]* gendiff $(man_MANS) po/*.in po/*.po po/rpm.pot \
8 rpm.magic rpmpopt rpm.spec rpm.8ru rpm2cpio.8ru
10 EXTRA_PROGRAMS = rpmconvert
12 SUBDIRS = popt build lib po intl misc tools scripts tests .
15 -I$(top_srcdir)/build \
17 -I$(top_srcdir)/intl \
18 -I$(top_srcdir)/popt \
21 mylibs= $(top_builddir)/build/librpmbuild.la \
22 $(top_builddir)/lib/librpm.la \
23 $(top_builddir)/popt/libpopt.la
25 LDFLAGS = @LDFLAGS_STATIC@
27 rpmbindir = $(subst usr/bin,bin,$(bindir))
30 bin_PROGRAMS = rpm2cpio
33 noinst_PROGRAMS = @BUILD_RPMCONVERT@
35 man_MANS = rpm.8 rpm2cpio.8 # rpm.8ru rpm2cpio.8ru
37 pkglibdir = @RPMCONFIGDIR@
38 pkglib_DATA = rpmrc rpmpopt macros
39 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
40 config.guess config.sub
43 acconfig.h build.h checksig.h ftp.h \
44 install.h system.h url.h
46 rpm_SOURCES = build.c checksig.c ftp.c install.c rpm.c url.c
47 rpm_LDADD = $(mylibs) @LIBMISC@
49 $(PROGRAMS): $(mylibs) @LIBMISC@
53 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
55 CVSTAG = r$(subst .,-,$(VERSION))
57 rpm2cpio_SOURCES = rpm2cpio.c
58 rpm2cpio_LDADD = $(mylibs)
60 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
61 ## Libmisc.a is required for rpmconvert.
62 rpmconvert_LDADD = $(mylibs) @LIBMISC@ -lgdbm
65 @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
66 @rm -f $(DESTDIR)/$(libdir)/rpmrc
67 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
68 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
69 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
70 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
71 @case "@build_cpu@" in \
72 *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
73 alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
74 sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc ;;\
75 powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
77 @case "@build_os@" in \
78 mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
79 *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
81 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
82 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
83 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
84 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
85 @$(mkinstalldirs) $(DESTDIR)/var/tmp
89 rm -rf /tmp/rpm-$(VERSION)
90 $(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
91 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
95 find . -name "Makefile" -exec rm {} \;
96 rm -f *gz *rpm config.*
100 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
102 echo "==> Please resolve differences between the repository and" ; \
103 echo "==> your rpm check out before tagging." ; \
109 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
112 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
115 nextsrpm: all archive
116 @sudo ./rpm -ta rpm-$(VERSION).tar.gz