1998-10-08 18:40:27 +08:00
|
|
|
# Top level Makefile for rpm
|
|
|
|
|
1999-01-20 07:54:30 +08:00
|
|
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
|
1999-12-08 05:14:51 +08:00
|
|
|
RPM-GPG-KEY RPM-PGP-KEY \
|
1999-01-22 02:42:53 +08:00
|
|
|
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
|
2001-05-08 03:21:16 +08:00
|
|
|
db db3/configure gendiff installplatform platform* \
|
2000-05-25 02:09:06 +08:00
|
|
|
po/*.in po/*.po po/rpm.pot \
|
2000-12-04 08:55:17 +08:00
|
|
|
rpm.magic rpmpopt-$(VERSION) rpmqv.c
|
1999-01-22 02:42:53 +08:00
|
|
|
|
2000-12-04 10:13:11 +08:00
|
|
|
# XXX TODO: perl
|
2001-05-08 08:03:14 +08:00
|
|
|
SUBDIRS = intl po @WITH_DB_SUBDIR@ popt rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
INCLUDES = \
|
|
|
|
-I$(top_srcdir)/build \
|
|
|
|
-I$(top_srcdir)/lib \
|
|
|
|
-I$(top_srcdir)/rpmdb \
|
|
|
|
-I$(top_srcdir)/rpmio \
|
|
|
|
-I$(top_srcdir)/popt \
|
|
|
|
@INCPATH@
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-06-13 15:15:15 +08:00
|
|
|
LIBS =
|
|
|
|
|
2001-05-24 00:38:52 +08:00
|
|
|
myLDFLAGS = # @LDFLAGS_STATIC@
|
2000-02-26 00:49:05 +08:00
|
|
|
|
|
|
|
# XXX libtool can/should generate dependent libs.
|
|
|
|
# XXX solaris2.6 cannot use *.la with --all-static (downrev binutils/egcs?)
|
2000-06-08 07:25:41 +08:00
|
|
|
# XXX top_builddir ldpaths are wrong building in tree
|
2001-05-08 08:03:14 +08:00
|
|
|
myLDADD = \
|
|
|
|
$(top_builddir)/build/librpmbuild.la \
|
2001-05-08 03:21:16 +08:00
|
|
|
$(top_builddir)/lib/librpm.la \
|
2001-05-08 08:03:14 +08:00
|
|
|
$(top_builddir)/rpmdb/librpmdb.la \
|
2001-05-08 03:21:16 +08:00
|
|
|
$(top_builddir)/rpmio/librpmio.la \
|
|
|
|
$(top_builddir)/popt/libpopt.la \
|
2001-02-28 05:30:27 +08:00
|
|
|
@INTLLIBS@ @LIBMISC@
|
1999-01-22 06:30:50 +08:00
|
|
|
|
1999-10-01 05:10:04 +08:00
|
|
|
rpmbindir = `echo $(bindir) | sed -e s,usr/bin,bin,`
|
1998-10-08 18:40:27 +08:00
|
|
|
rpmbin_PROGRAMS = rpm
|
|
|
|
|
|
|
|
bin_PROGRAMS = rpm2cpio
|
|
|
|
bin_SCRIPTS = gendiff
|
1999-04-04 01:13:35 +08:00
|
|
|
|
2000-05-25 01:53:35 +08:00
|
|
|
pkglibdir = @RPMCONFIGDIR@
|
2001-05-08 08:03:14 +08:00
|
|
|
pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq
|
2000-06-22 21:39:44 +08:00
|
|
|
pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros
|
2000-05-25 01:53:35 +08:00
|
|
|
pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
|
2001-06-15 12:56:33 +08:00
|
|
|
config.guess config.sub config.site
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-06-22 21:39:44 +08:00
|
|
|
rpmpopt-$(VERSION): rpmpopt
|
2001-02-28 05:30:27 +08:00
|
|
|
cp rpmpopt $@
|
2000-06-22 21:39:44 +08:00
|
|
|
|
1998-10-08 18:40:27 +08:00
|
|
|
noinst_HEADERS = \
|
2000-12-13 04:03:45 +08:00
|
|
|
acconfig.h build.h debug.h system.h
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-06-07 03:57:12 +08:00
|
|
|
#rpm_SOURCES =
|
|
|
|
#rpm_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
|
|
|
#rpm_LDADD = rpm.o $(myLDADD)
|
|
|
|
#rpm.o: rpmqv.c
|
|
|
|
# $(COMPILE) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.c
|
|
|
|
|
2000-05-27 02:51:11 +08:00
|
|
|
rpm_SOURCES = rpm.c
|
2000-05-25 01:53:35 +08:00
|
|
|
rpm_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
2001-02-28 05:30:27 +08:00
|
|
|
rpm_LDADD = $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
|
|
|
|
rpmb_SOURCES = build.c
|
2001-06-07 03:57:12 +08:00
|
|
|
rpmb_LDFLAGS = $(myLDFLAGS)
|
2000-06-01 12:47:42 +08:00
|
|
|
rpmb_LDADD = rpmb.o $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
rpmb.o: rpmqv.c
|
2001-02-28 05:30:27 +08:00
|
|
|
$(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.c
|
2000-05-25 01:53:35 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
rpmd_SOURCES =
|
|
|
|
rpmd_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
|
|
|
rpmd_LDADD = rpmd.o $(myLDADD)
|
|
|
|
rpmd.o: rpmqv.c
|
2001-02-28 05:30:27 +08:00
|
|
|
$(COMPILE) -DIAM_RPMDB -o $@ -c rpmqv.c
|
2000-05-25 01:53:35 +08:00
|
|
|
|
|
|
|
rpmi_SOURCES =
|
2001-03-17 00:33:25 +08:00
|
|
|
rpmi_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
2000-06-01 12:47:42 +08:00
|
|
|
rpmi_LDADD = rpmi.o $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
rpmi.o: rpmqv.c
|
2001-02-28 05:30:27 +08:00
|
|
|
$(COMPILE) -DIAM_RPMEIU -o $@ -c rpmqv.c
|
2000-05-25 01:53:35 +08:00
|
|
|
|
|
|
|
rpmk_SOURCES =
|
2001-03-17 00:33:25 +08:00
|
|
|
rpmk_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
2000-06-01 12:47:42 +08:00
|
|
|
rpmk_LDADD = rpmk.o $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
rpmk.o: rpmqv.c
|
2001-02-28 05:30:27 +08:00
|
|
|
$(COMPILE) -DIAM_RPMK -o $@ -c rpmqv.c
|
2000-05-25 01:53:35 +08:00
|
|
|
|
|
|
|
rpmq_SOURCES =
|
2001-03-17 00:33:25 +08:00
|
|
|
rpmq_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
2000-06-01 12:47:42 +08:00
|
|
|
rpmq_LDADD = rpmq.o $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
rpmq.o: rpmqv.c
|
2001-02-28 05:30:27 +08:00
|
|
|
$(COMPILE) -DIAM_RPMQV -o $@ -c rpmqv.c
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-05-25 01:53:35 +08:00
|
|
|
rpm2cpio_SOURCES = rpm2cpio.c
|
2001-03-17 00:33:25 +08:00
|
|
|
rpm2cpio_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
|
2001-02-28 05:30:27 +08:00
|
|
|
rpm2cpio_LDADD = $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@
|
1998-10-08 18:40:27 +08:00
|
|
|
|
1998-11-21 04:18:22 +08:00
|
|
|
.PHONY: lclint
|
|
|
|
lclint:
|
2001-05-04 05:00:18 +08:00
|
|
|
lclint $(DEFS) $(INCLUDES) rpmqv.c $(rpmb_SOURCES) \
|
|
|
|
`make -s sources -C build` \
|
|
|
|
`make -s sources -C lib` \
|
2001-05-08 08:03:14 +08:00
|
|
|
`make -s sources -C rpmdb` \
|
2001-05-04 05:00:18 +08:00
|
|
|
`make -s sources -C rpmio` \
|
|
|
|
`make -s sources -C popt`
|
1998-11-21 04:18:22 +08:00
|
|
|
|
1998-10-08 22:23:53 +08:00
|
|
|
CVSTAG = r$(subst .,-,$(VERSION))
|
|
|
|
|
2001-01-18 00:00:36 +08:00
|
|
|
pkgsrcdir = $(prefix)/src/$(RPMCANONVENDOR)
|
|
|
|
|
1998-10-08 18:40:27 +08:00
|
|
|
install-data-local:
|
1999-04-30 23:55:45 +08:00
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
|
2001-01-18 00:00:36 +08:00
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpmrc
|
|
|
|
@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
|
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpmpopt
|
|
|
|
@@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt
|
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
|
|
|
|
@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
|
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpm/rpme
|
|
|
|
@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme
|
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpm/rpmu
|
|
|
|
@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu
|
|
|
|
@rm -f $(DESTDIR)$(libdir)/rpm/rpmv
|
|
|
|
@@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv
|
|
|
|
rm -f $(DESTDIR)$(bindir)/rpmbuild
|
|
|
|
@LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild
|
|
|
|
rm -f $(DESTDIR)$(bindir)/rpmquery
|
|
|
|
@LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery
|
|
|
|
rm -f $(DESTDIR)$(bindir)/rpmverify
|
|
|
|
@LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify
|
|
|
|
rm -f $(DESTDIR)$(bindir)/rpmsign
|
|
|
|
@LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign
|
2001-05-08 08:03:14 +08:00
|
|
|
rm -f $(DESTDIR)$(bindir)/rpmdb ; \
|
|
|
|
@LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
|
|
|
|
for bf in e i u ; do \
|
2001-01-18 00:00:36 +08:00
|
|
|
rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \
|
|
|
|
@LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
|
2000-05-25 01:53:35 +08:00
|
|
|
done
|
2001-05-10 06:58:56 +08:00
|
|
|
@for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\
|
|
|
|
done
|
1999-03-12 14:00:17 +08:00
|
|
|
@case "@build_cpu@" in \
|
2001-05-10 06:58:56 +08:00
|
|
|
*86) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i386 ;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\
|
2001-01-18 00:00:36 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
|
2001-05-10 06:58:56 +08:00
|
|
|
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
|
2001-01-18 00:00:36 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
|
2001-05-10 06:58:56 +08:00
|
|
|
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
|
2001-01-18 00:00:36 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;;\
|
|
|
|
ia64*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
|
|
|
|
s390*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
|
|
|
|
powerpc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc ;;\
|
2001-05-10 06:58:56 +08:00
|
|
|
*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@build_cpu@ ;;\
|
1999-03-12 14:00:17 +08:00
|
|
|
esac
|
2001-05-10 06:58:56 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
|
1999-06-18 05:35:34 +08:00
|
|
|
@case "@build_os@" in \
|
2001-01-18 00:00:36 +08:00
|
|
|
mint) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\
|
2000-06-13 17:12:39 +08:00
|
|
|
solaris*|linux*) \
|
2001-05-10 06:58:56 +08:00
|
|
|
chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ;; \
|
1999-06-18 05:35:34 +08:00
|
|
|
esac
|
1998-10-20 21:40:27 +08:00
|
|
|
@$(mkinstalldirs) $(DESTDIR)/var/tmp
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-05-10 06:58:56 +08:00
|
|
|
.PHONY: setperms
|
|
|
|
setperms:
|
|
|
|
@for f in $(rpmbin_PROGRAMS) ; do\
|
|
|
|
$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(rpmbindir)/$$f ;\
|
2001-05-14 01:55:58 +08:00
|
|
|
$(__CHMOD) g+s $(DESTDIR)$(rpmbindir)/$$f ;\
|
2001-05-10 06:58:56 +08:00
|
|
|
done
|
|
|
|
@for f in $(bin_PROGRAMS) ; do\
|
|
|
|
$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(bindir)/$$f ;\
|
|
|
|
done
|
|
|
|
@for f in $(pkglib_PROGRAMS) ; do\
|
|
|
|
$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\
|
2001-05-14 01:55:58 +08:00
|
|
|
$(__CHMOD) g+s $(DESTDIR)$(pkglibdir)/$$f ;\
|
2001-05-10 06:58:56 +08:00
|
|
|
done
|
|
|
|
@for f in $(pkglib_SCRIPTS) ; do\
|
|
|
|
$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\
|
|
|
|
done
|
|
|
|
@$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)
|
|
|
|
@$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(varprefix)/lib/rpm
|
2001-05-11 12:01:04 +08:00
|
|
|
-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/[A-Z]*
|
|
|
|
-@$(__CHMOD) 0775 $(DESTDIR)$(varprefix)/lib/rpm
|
|
|
|
-@$(__CHMOD) 0755 $(DESTDIR)$(varprefix)/lib/rpm/Desktop
|
|
|
|
-@$(__CHMOD) 0664 $(DESTDIR)$(varprefix)/lib/rpm/__db.*
|
|
|
|
|
2001-05-14 01:55:58 +08:00
|
|
|
.PHONY: unsetgid
|
|
|
|
unsetgid:
|
2001-05-11 12:01:04 +08:00
|
|
|
@for f in $(rpmbin_PROGRAMS) ; do\
|
2001-05-14 01:55:58 +08:00
|
|
|
$(__CHMOD) g-s $(DESTDIR)$(rpmbindir)/$$f ;\
|
2001-05-11 12:01:04 +08:00
|
|
|
done
|
|
|
|
@for f in $(pkglib_PROGRAMS) ; do\
|
2001-05-14 01:55:58 +08:00
|
|
|
$(__CHMOD) g-s $(DESTDIR)$(pkglibdir)/$$f ;\
|
2001-05-11 12:01:04 +08:00
|
|
|
done
|
2001-05-10 06:58:56 +08:00
|
|
|
|
2000-01-20 03:20:56 +08:00
|
|
|
.PHONY: tar
|
1998-10-08 18:40:27 +08:00
|
|
|
tar:
|
|
|
|
rm -rf /tmp/rpm-$(VERSION)
|
1999-04-30 23:55:45 +08:00
|
|
|
$(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
|
1998-10-08 18:40:27 +08:00
|
|
|
cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
|
|
|
|
|
|
|
|
.PHONY: noconfig
|
|
|
|
noconfig:
|
|
|
|
find . -name "Makefile" -exec rm {} \;
|
|
|
|
rm -f *gz *rpm config.*
|
|
|
|
|
|
|
|
.PHONY: archive
|
|
|
|
archive:
|
1999-01-27 05:57:57 +08:00
|
|
|
@cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
|
1999-01-27 03:04:39 +08:00
|
|
|
echo " " ; \
|
|
|
|
echo "==> Please resolve differences between the repository and" ; \
|
|
|
|
echo "==> your rpm check out before tagging." ; \
|
|
|
|
echo " " ; \
|
|
|
|
cvs -n up ; \
|
|
|
|
echo " " ; \
|
|
|
|
exit 1 ; \
|
|
|
|
}
|
|
|
|
@cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
|
1999-01-27 02:08:14 +08:00
|
|
|
@make dist
|
1998-10-08 18:40:27 +08:00
|
|
|
@echo " "
|
|
|
|
@echo "The final archive is ./rpm-$(VERSION).tar.gz."
|
1999-01-27 03:07:25 +08:00
|
|
|
|
|
|
|
.PHONY: nextsrpm
|
1999-01-27 06:25:24 +08:00
|
|
|
nextsrpm: all archive
|
1999-01-27 03:07:25 +08:00
|
|
|
@sudo ./rpm -ta rpm-$(VERSION).tar.gz
|
2000-01-20 03:20:56 +08:00
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
.PHONY: doxygen
|
|
|
|
doxygen @WITH_APIDOCS_TARGET@: Doxyfile
|
|
|
|
rm -rf $@
|
|
|
|
mkdir -p $@
|
2000-12-13 04:03:45 +08:00
|
|
|
- [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@
|
2000-10-29 01:16:25 +08:00
|
|
|
|
|
|
|
ctags:
|
|
|
|
find . -type f -name "*.[ch]*" | xargs @CTAGS@
|
|
|
|
|
|
|
|
cscope:
|
|
|
|
@CSCOPE@ -b -R
|
|
|
|
|
|
|
|
cref: ctags cscope
|