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 gendiff po/*.in po/*.po po/rpm.pot \
8 python/*.am python/*.in python/*.c python/*.h python/testit \
9 rpm.magic rpmpopt rpm.spec
11 EXTRA_PROGRAMS = rpmconvert
13 # XXX TODO: python perl
14 SUBDIRS = intl po popt build lib misc tools scripts tests doc .
17 -I$(top_srcdir)/build \
19 -I$(top_srcdir)/popt \
24 mylibs= $(top_builddir)/build/librpmbuild.la \
25 $(top_builddir)/lib/librpm.la \
26 $(top_builddir)/popt/libpopt.la \
30 LDFLAGS = @LDFLAGS_STATIC@
32 rpmbindir = $(subst usr/bin,bin,$(bindir))
35 bin_PROGRAMS = rpm2cpio
38 noinst_PROGRAMS = @BUILD_RPMCONVERT@
40 pkglibdir = @RPMCONFIGDIR@
41 pkglib_DATA = rpmrc rpmpopt macros
42 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
43 config.guess config.sub
46 acconfig.h build.h system.h
48 rpm_SOURCES = build.c rpm.c
51 $(PROGRAMS): $(mylibs)
55 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
57 CVSTAG = r$(subst .,-,$(VERSION))
59 rpm2cpio_SOURCES = rpm2cpio.c
60 rpm2cpio_LDADD = $(mylibs)
62 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
63 ## Libmisc.a is required for rpmconvert.
64 rpmconvert_LDADD = $(mylibs) -lgdbm
67 @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
68 @rm -f $(DESTDIR)/$(libdir)/rpmrc
69 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
70 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
71 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
72 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
73 @case "@build_cpu@" in \
74 *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
75 alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
76 sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc;\
77 $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc64 ;;\
78 powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
80 @case "@build_os@" in \
81 mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
82 *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
84 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
85 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
86 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
87 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
88 @$(mkinstalldirs) $(DESTDIR)/var/tmp
92 rm -rf /tmp/rpm-$(VERSION)
93 $(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
94 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
98 find . -name "Makefile" -exec rm {} \;
99 rm -f *gz *rpm config.*
103 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
105 echo "==> Please resolve differences between the repository and" ; \
106 echo "==> your rpm check out before tagging." ; \
112 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
115 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
118 nextsrpm: all archive
119 @sudo ./rpm -ta rpm-$(VERSION).tar.gz