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 po/*.in po/*.po po/rpm.pot \
8 python/*.am python/*.in python/*.c python/testit \
9 rpm.magic rpmpopt rpm.spec rpm.8ru rpm2cpio.8ru
11 EXTRA_PROGRAMS = rpmconvert
13 # XXX TODO: python perl
14 SUBDIRS = popt build lib po intl misc tools scripts tests doc .
17 -I$(top_srcdir)/build \
19 -I$(top_srcdir)/intl \
20 -I$(top_srcdir)/popt \
23 mylibs= $(top_builddir)/build/librpmbuild.la \
24 $(top_builddir)/lib/librpm.la \
25 $(top_builddir)/popt/libpopt.la
27 LDFLAGS = @LDFLAGS_STATIC@
29 rpmbindir = $(subst usr/bin,bin,$(bindir))
32 bin_PROGRAMS = rpm2cpio
35 noinst_PROGRAMS = @BUILD_RPMCONVERT@
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 system.h
45 rpm_SOURCES = build.c rpm.c
46 rpm_LDADD = $(mylibs) @LIBMISC@
48 $(PROGRAMS): $(mylibs) @LIBMISC@
52 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
54 CVSTAG = r$(subst .,-,$(VERSION))
56 rpm2cpio_SOURCES = rpm2cpio.c
57 rpm2cpio_LDADD = $(mylibs)
59 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
60 ## Libmisc.a is required for rpmconvert.
61 rpmconvert_LDADD = $(mylibs) @LIBMISC@ -lgdbm
64 @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
65 @rm -f $(DESTDIR)/$(libdir)/rpmrc
66 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
67 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
68 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
69 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
70 @case "@build_cpu@" in \
71 *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
72 alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
73 sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc ;;\
74 powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
76 @case "@build_os@" in \
77 mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
78 *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
80 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
81 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
82 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
83 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
84 @$(mkinstalldirs) $(DESTDIR)/var/tmp
88 rm -rf /tmp/rpm-$(VERSION)
89 $(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
90 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
94 find . -name "Makefile" -exec rm {} \;
95 rm -f *gz *rpm config.*
99 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
101 echo "==> Please resolve differences between the repository and" ; \
102 echo "==> your rpm check out before tagging." ; \
108 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
111 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
114 nextsrpm: all archive
115 @sudo ./rpm -ta rpm-$(VERSION).tar.gz