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 \
|
2000-05-25 02:28:36 +08:00
|
|
|
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
|
|
|
|
SUBDIRS = intl po popt rpmio lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-06-08 07:25:41 +08:00
|
|
|
INCLUDES = -I$(top_srcdir)/build -I$(top_srcdir)/lib -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 =
|
|
|
|
|
|
|
|
myLDFLAGS = # -L$(top_builddir)/build/.libs -L$(top_builddir)/lib/.libs \
|
2000-06-08 07:25:41 +08:00
|
|
|
-L$(top_builddir)/rpmio/.libs -L$(top_builddir)/popt/.libs
|
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
|
2000-06-13 15:15:15 +08:00
|
|
|
myLDADD = $(top_builddir)/build/librpmbuild.la $(top_builddir)/lib/librpm.la \
|
|
|
|
$(top_builddir)/rpmio/librpmio.la $(top_builddir)/popt/libpopt.la \
|
2000-06-08 07:25:41 +08:00
|
|
|
@INTLLIBS@
|
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@
|
|
|
|
pkglib_PROGRAMS = rpmb rpmdb 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 \
|
|
|
|
config.guess config.sub
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-06-22 21:39:44 +08:00
|
|
|
rpmpopt-$(VERSION): rpmpopt
|
|
|
|
cp $< $@
|
|
|
|
|
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
|
|
|
|
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)
|
2000-06-08 07:25:41 +08:00
|
|
|
rpm_LDADD = $(myLDADD) @LIBMISC@
|
2000-05-25 01:53:35 +08:00
|
|
|
|
|
|
|
rpmb_SOURCES = build.c
|
2001-01-01 04:30:37 +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
|
|
|
|
$(COMPILE) -DIAM_RPMBT -o $@ -c $<
|
|
|
|
|
|
|
|
rpmdb_SOURCES =
|
2001-01-01 04:30:37 +08:00
|
|
|
rpmdb_LDFLAGS = $(myLDFLAGS)
|
2000-06-01 12:47:42 +08:00
|
|
|
rpmdb_LDADD = rpmdb.o $(myLDADD)
|
2000-05-25 01:53:35 +08:00
|
|
|
rpmdb.o: rpmqv.c
|
|
|
|
$(COMPILE) -DIAM_RPMDB -o $@ -c $<
|
|
|
|
|
|
|
|
rpmi_SOURCES =
|
2001-01-01 04:30:37 +08:00
|
|
|
rpmi_LDFLAGS = $(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
|
|
|
|
$(COMPILE) -DIAM_RPMEIU -o $@ -c $<
|
|
|
|
|
|
|
|
rpmk_SOURCES =
|
2001-01-01 04:30:37 +08:00
|
|
|
rpmk_LDFLAGS = $(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
|
|
|
|
$(COMPILE) -DIAM_RPMK -o $@ -c $<
|
|
|
|
|
|
|
|
rpmq_SOURCES =
|
2001-01-01 04:30:37 +08:00
|
|
|
rpmq_LDFLAGS = $(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
|
|
|
|
$(COMPILE) -DIAM_RPMQV -o $@ -c $<
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-05-25 01:53:35 +08:00
|
|
|
rpm2cpio_SOURCES = rpm2cpio.c
|
2001-01-01 04:30:37 +08:00
|
|
|
rpm2cpio_LDFLAGS = $(myLDFLAGS)
|
2000-06-08 07:25:41 +08:00
|
|
|
rpm2cpio_LDADD = $(myLDADD) @LIBMISC@
|
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:
|
2000-07-08 04:06:41 +08:00
|
|
|
lclint $(DEFS) $(INCLUDES) $(rpm_SOURCES) $(rpmb_SOURCES) rpmqv.c
|
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
|
2000-07-26 02:37:21 +08:00
|
|
|
for bf in db 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-01-18 00:00:36 +08:00
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/BUILD
|
1999-03-12 14:00:17 +08:00
|
|
|
@case "@build_cpu@" in \
|
2001-01-18 00:00:36 +08:00
|
|
|
*86) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i386;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
|
|
|
|
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
|
|
|
|
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9;\
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;;\
|
|
|
|
ia64*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
|
|
|
|
s390*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
|
|
|
|
powerpc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc ;;\
|
1999-03-12 14:00:17 +08:00
|
|
|
esac
|
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*) \
|
2000-09-14 19:42:48 +08:00
|
|
|
chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ; \
|
2001-01-18 00:00:36 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@build_cpu@ ;;\
|
|
|
|
*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/@build_cpu@ ;;\
|
1999-06-18 05:35:34 +08:00
|
|
|
esac
|
2001-01-18 00:00:36 +08:00
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
|
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/SOURCES
|
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/SPECS
|
|
|
|
@$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/SRPMS
|
1998-10-20 21:40:27 +08:00
|
|
|
@$(mkinstalldirs) $(DESTDIR)/var/tmp
|
1998-10-08 18:40:27 +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
|