2002-03-25 23:16:26 +03:00
# Top level Makefile for rpm
AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
RPM-GPG-KEY RPM-PGP-KEY \
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
2002-03-25 23:52:35 +03:00
config.site gendiff installplatform platform* \
po/*.in po/*.po po/rpm.pot \
2002-03-25 23:16:26 +03:00
rpm.magic rpmpopt-$( VERSION) rpmqv.c rpm.c
2002-12-10 00:32:19 +03:00
SUBDIRS = po rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
2002-03-25 23:16:26 +03:00
INCLUDES = \
-I$( top_srcdir) /build \
-I$( top_srcdir) /lib \
-I$( top_srcdir) /rpmdb \
-I$( top_srcdir) /rpmio \
@INCPATH@
myLDFLAGS = # @LDFLAGS_STATIC@
2003-11-26 12:17:56 +03:00
myLDADD = $( top_builddir) /lib/librpm.la $( top_builddir) /build/librpmbuild.la
2002-03-25 23:16:26 +03:00
rpmbindir = ` echo $( bindir) | sed -e s,usr/bin,bin,`
2004-01-20 19:21:59 +03:00
rpmbin_PROGRAMS =
2002-03-25 23:16:26 +03:00
2004-01-20 19:21:59 +03:00
bin_PROGRAMS = rpm rpm.static rpm2cpio
2002-03-25 23:16:26 +03:00
bin_SCRIPTS = gendiff
pkglibdir = @RPMCONFIGDIR@
pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq
pkglib_DATA = rpmrc rpmpopt-$( VERSION) macros
pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
config.guess config.sub config.site
rpmpopt-$(VERSION) : rpmpopt
cp rpmpopt $@
2002-08-03 20:35:14 +04:00
noinst_HEADERS = build.h debug.h system.h
2002-03-25 23:16:26 +03:00
rpm_SOURCES =
2004-01-20 19:21:59 +03:00
rpm_LDFLAGS = $( myLDFLAGS)
2002-03-25 23:16:26 +03:00
rpm_LDADD = rpm.o $( myLDADD)
rpm.o : rpmqv .c
$( COMPILE) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.c
2004-01-20 19:21:59 +03:00
rpm.static_SOURCES =
rpm.static_LDFLAGS = @LDFLAGS_STATIC@ $( myLDFLAGS)
rpm.static_LDADD = rpm.static.o $( myLDADD)
rpm.static.o : rpmqv .c
$( COMPILE) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.c
2002-03-25 23:16:26 +03:00
#rpm_SOURCES = rpm.c
#rpm_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
#rpm_LDADD = $(myLDADD)
rpmb_SOURCES = build.c
rpmb_LDFLAGS = $( myLDFLAGS)
2003-11-26 12:17:56 +03:00
rpmb_LDADD = rpmb.o $( myLDADD)
2002-03-25 23:16:26 +03:00
rpmb.o : rpmqv .c
$( COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.c
rpmd_SOURCES =
rpmd_LDFLAGS = $( myLDFLAGS)
rpmd_LDADD = rpmd.o $( myLDADD)
rpmd.o : rpmqv .c
$( COMPILE) -DIAM_RPMDB -o $@ -c rpmqv.c
rpmi_SOURCES =
rpmi_LDFLAGS = $( myLDFLAGS)
rpmi_LDADD = rpmi.o $( myLDADD)
rpmi.o : rpmqv .c
$( COMPILE) -DIAM_RPMEIU -o $@ -c rpmqv.c
rpmk_SOURCES =
rpmk_LDFLAGS = $( myLDFLAGS)
rpmk_LDADD = rpmk.o $( myLDADD)
rpmk.o : rpmqv .c
$( COMPILE) -DIAM_RPMK -o $@ -c rpmqv.c
rpmq_SOURCES =
rpmq_LDFLAGS = $( myLDFLAGS)
rpmq_LDADD = rpmq.o $( myLDADD)
rpmq.o : rpmqv .c
$( COMPILE) -DIAM_RPMQV -o $@ -c rpmqv.c
rpm2cpio_SOURCES = rpm2cpio.c
rpm2cpio_LDFLAGS = $( myLDFLAGS)
2003-11-24 23:44:29 +03:00
rpm2cpio_LDADD = $( myLDADD)
2002-03-25 23:16:26 +03:00
$(PROGRAMS) : $( myLDADD ) @WITH_APIDOCS_TARGET @
.PHONY : lclint
lclint :
lclint $( DEFS) $( INCLUDES) rpmqv.c $( rpmb_SOURCES) \
` make -s sources -C build` \
` make -s sources -C lib` \
` make -s sources -C rpmdb` \
2002-03-25 23:52:35 +03:00
` make -s sources -C rpmio`
2002-03-25 23:16:26 +03:00
CVSTAG = r$( subst .,-,$( VERSION) )
2002-03-25 23:52:35 +03:00
pkgsrcdir = $( prefix) /src/RPM
2002-03-25 23:16:26 +03:00
install-data-local :
2004-01-20 19:21:59 +03:00
@$( mkinstalldirs) $( DESTDIR) $( rpmbindir)
@@LN_S@ ..$( bindir) /rpm $( DESTDIR) $( rpmbindir) /
2002-03-25 23:16:26 +03:00
@$( mkinstalldirs) $( DESTDIR) $( varprefix) /lib/rpm
@rm -f $( DESTDIR) $( libdir) /rpmrc
@@LN_S@ rpm/rpmrc $( DESTDIR) $( libdir) /rpmrc
@rm -f $( DESTDIR) $( libdir) /rpmpopt
2002-03-25 23:52:35 +03:00
@@LN_S@ rpm/rpmpopt-$( VERSION) $( DESTDIR) $( libdir) /rpmpopt
2002-03-25 23:16:26 +03:00
@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
2002-03-25 23:52:35 +03:00
rm -f $( DESTDIR) $( bindir) /rpmdb
@LN_S@ ../lib/rpm/rpmd $( DESTDIR) $( bindir) /rpmdb
2002-03-25 23:16:26 +03:00
for bf in e i u ; do \
rm -f $( DESTDIR) $( bindir) /rpm$$ bf ; \
@LN_S@ ../lib/rpm/rpm$$ bf $( DESTDIR) $( bindir) /rpm$$ bf ; \
done
2002-03-25 23:52:35 +03:00
rm -f $( DESTDIR) $( bindir) /relative
@LN_S@ ../lib/rpm/relative $( DESTDIR) $( bindir) /relative
@for dir in BUILD RPMS SOURCES SPECS SRPMS ; do \
$( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /$$ dir; \
2002-03-25 23:16:26 +03:00
done
@case "@host_cpu@" in \
*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 ; ; \
mipsel*) $( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/mipsel ; ; \
mips*) $( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/mips ; ; \
powerpc*) $( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/ppc ; \
$( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/ppc64 ; ; \
*) $( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/@host_cpu@ ; ; \
esac
$( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/noarch
@case "@host_os@" in \
mint) $( mkinstalldirs) $( DESTDIR) $( pkgsrcdir) /RPMS/m68kmint ; ; \
solaris*| linux*) \
chmod u+x ./installplatform; DESTDIR = " $( DESTDIR) " pkglibdir = " $( pkglibdir) " ./installplatform rpmrc macros platform ; ; \
esac
@$( mkinstalldirs) $( DESTDIR) /var/tmp
.PHONY : setperms
setperms :
@for f in $( rpmbin_PROGRAMS) ; do \
$( __CHOWN) ${ RPMUSER } .${ RPMGROUP } $( DESTDIR) $( rpmbindir) /$$ f ; \
$( __CHMOD) g+s $( DESTDIR) $( rpmbindir) /$$ f ; \
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 ; \
$( __CHMOD) g+s $( DESTDIR) $( pkglibdir) /$$ f ; \
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
-@$( __CHMOD) 0664 $( DESTDIR) $( varprefix) /lib/rpm/[ A-Z] *
-@$( __CHMOD) 0775 $( DESTDIR) $( varprefix) /lib/rpm
-@$( __CHMOD) 0664 $( DESTDIR) $( varprefix) /lib/rpm/__db.*
.PHONY : unsetgid
unsetgid :
@for f in $( rpmbin_PROGRAMS) ; do \
$( __CHMOD) g-s $( DESTDIR) $( rpmbindir) /$$ f ; \
done
@for f in $( pkglib_PROGRAMS) ; do \
$( __CHMOD) g-s $( DESTDIR) $( pkglibdir) /$$ f ; \
done
.PHONY : tar
tar :
rm -rf /tmp/rpm-$( VERSION)
$( MAKE) DESTDIR = /tmp/rpm-$( VERSION) install
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 :
@cvs -d ` cat CVS/Root` diff 2>& 1 > /dev/null || { \
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) .
@make dist
@echo " "
@echo " The final archive is ./rpm- $( VERSION) .tar.gz. "
.PHONY : nextsrpm
nextsrpm : all archive
@sudo ./rpm -ta rpm-$( VERSION) .tar.gz
.PHONY : doxygen
doxygen @WITH_APIDOCS_TARGET@ : Doxyfile
rm -rf $@
mkdir -p $@
- [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@
ctags :
find . -type f -name "*.[ch]*" | xargs @CTAGS@
cscope :
@CSCOPE@ -b -R
cref : ctags cscope