diff options
author | Florian Festi <ffesti@redhat.com> | 2011-03-21 14:39:10 +0100 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2011-03-25 10:10:52 +0100 |
commit | a0d04112c014969e2bdf5f7f280e6635ceea40e8 (patch) | |
tree | eeb8e1a68cb02faafd575edf1abbd0e045c64024 | |
parent | 609236f6d6fc1447a15ff039d0b994ebbb274796 (diff) | |
download | librpm-tizen-a0d04112c014969e2bdf5f7f280e6635ceea40e8.tar.gz librpm-tizen-a0d04112c014969e2bdf5f7f280e6635ceea40e8.tar.bz2 librpm-tizen-a0d04112c014969e2bdf5f7f280e6635ceea40e8.zip |
Move find-provides and find-requires link to autodeps/
Implement link reaction with less copied code
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | configure.ac | 59 |
2 files changed, 28 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am index f1bcd7c8a..41d7de818 100644 --- a/Makefile.am +++ b/Makefile.am @@ -90,10 +90,11 @@ rpmbin_PROGRAMS = rpm bin_PROGRAMS = rpm2cpio rpmbuild rpmdb rpmkeys rpmsign rpmspec rpmlibexec_PROGRAMS = -rpmconfig_SCRIPTS = find-provides find-requires mkinstalldirs \ +rpmconfig_SCRIPTS = autodeps/find-provides autodeps/find-requires \ + mkinstalldirs \ config.guess config.sub -DISTCLEANFILES = find-provides -DISTCLEANFILES += find-requires +DISTCLEANFILES = autodeps/find-provides +DISTCLEANFILES += autodeps/find-requires noinst_LTLIBRARIES = libcliutils.la libcliutils_la_SOURCES = cliutils.h cliutils.c diff --git a/configure.ac b/configure.ac index 067088f3e..e71364c8f 100644 --- a/configure.ac +++ b/configure.ac @@ -752,41 +752,30 @@ host_os_major=`echo "${host_os}" | sed 's/\..*$//'` host_os_noversion=`echo "${host_os}" | sed 's/[0-9]*\..*$//'` changequote([, ]) -rm -f ./find-provides -if test -f ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov ; then - echo "using ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov for automatic provides generation" - ln -s ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov ./find-provides -elif test -f ${srcdir}/autodeps/${host_os_exact}.prov ; then - echo "using ${srcdir}/autodeps/${host_os_exact}.prov for automatic provides generation" - ln -s ${srcdir}/autodeps/${host_os_exact}.prov ./find-provides -elif test -f ${srcdir}/autodeps/${host_os_major}.prov ; then - echo "using ${srcdir}/autodeps/${host_os_major}.prov for automatic provides generation" - ln -s ${srcdir}/autodeps/${host_os_major}.prov ./find-provides -elif test -f ${srcdir}/autodeps/${host_os_noversion}.prov ; then - echo "using ${srcdir}/autodeps/${host_os_noversion}.prov for automatic provides generation" - ln -s ${srcdir}/autodeps/${host_os_noversion}.prov ./find-provides -else - echo "*** no default provides information is available for ${host_os_noversion}" - ln -s ${srcdir}/autodeps/none ./find-provides -fi - -rm -f ./find-requires -if test -f ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req ; then - echo "using ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req for automatic requires generation" - ln -s ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req ./find-requires -elif test -f ${srcdir}/autodeps/${host_os_exact}.req ; then - echo "using ${srcdir}/autodeps/${host_os_exact}.req for automatic requires generation" - ln -s ${srcdir}/autodeps/${host_os_exact}.req ./find-requires -elif test -f ${srcdir}/autodeps/${host_os_major}.req ; then - echo "using ${srcdir}/autodeps/${host_os_major}.req for automatic requires generation" - ln -s ${srcdir}/autodeps/${host_os_major}.req ./find-requires -elif test -f ${srcdir}/autodeps/${host_os_noversion}.req ; then - echo "using ${srcdir}/autodeps/${host_os_noversion}.req for automatic requires generation" - ln -s ${srcdir}/autodeps/${host_os_noversion}.req ./find-requires -else - echo "*** no default requires information is available for ${host_os_noversion}" - ln -s ${srcdir}/autodeps/none ./find-requires -fi +for provscript in ${host_cpu}-${host_os_exact}.prov ${host_os_exact}.prov ${host_os_major}.prov ${host_os_noversion}.prov none ; do { + if test -f ${srcdir}/autodeps/${provscript} ; then + if [[ ${provscript} == none ]] ; then + echo "*** no default provides information is available for ${host_os_noversion}" + else + echo "using ${srcdir}/autodeps/${provscript} for automatic provides generation" + fi + ln -sf ${provscript} ${srcdir}/autodeps/find-provides + break + fi +}; done + + +for reqscript in ${host_cpu}-${host_os_exact}.req ${host_os_exact}.req ${host_os_major}.req ${host_os_noversion}.req none ; do { + if test -f ${srcdir}/autodeps/${reqscript} ; then + if [[ ${reqscript} == none ]] ; then + echo "*** no default requires information is available for ${host_os_noversion}" + else + echo "using ${srcdir}/autodeps/${reqscript} for automatic requires generation" + fi + ln -sf ${reqscript} ./autodeps/find-requires + break + fi +} done dnl Determine the canonical arch-vendor-os for the host machine case "${host_cpu}" in |