From 3e7493527983f36fbca644a47fbae30c5fb16593 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 28 Jan 2015 22:44:35 +0100 Subject: [PATCH] move the DISTRO variable definition from common/Make.rules to parser/Makefile (which is the only Makefile that uses the DISTRO variable) Acked-by: Steve Beattie --- common/Make.rules | 20 -------------------- parser/Makefile | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/common/Make.rules b/common/Make.rules index 76b79d3b8..b8ac7e0b8 100644 --- a/common/Make.rules +++ b/common/Make.rules @@ -45,26 +45,6 @@ define nl endef -ifndef DISTRO -DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \ - echo slackware ; \ - elif [ -f /etc/debian_version ] ; then \ - echo debian ;\ - elif which rpm > /dev/null ; then \ - if [ "$(rpm --eval '0%{?suse_version}')" != "0" ] ; then \ - echo suse ;\ - elif [ "$(rpm --eval '%{_host_vendor}')" = redhat ] ; then \ - echo rhel4 ;\ - elif [ "$(rpm --eval '0%{?fedora}')" != "0" ] ; then \ - echo rhel4 ;\ - else \ - echo unknown ;\ - fi ;\ - else \ - echo unknown ;\ - fi) -endif - REPO_VERSION_CMD=([ -x /usr/bin/bzr ] && /usr/bin/bzr version-info . 2> /dev/null || awk '{ print "revno: "$2 }' common/.stamp_rev) | awk '/^revno:/ { print $2 }' ifndef PYTHON_VERSIONS diff --git a/parser/Makefile b/parser/Makefile index 2f8c04dcf..75bedd03d 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -328,6 +328,27 @@ install-debian: install-unknown: INSTALLDEPS=arch + +ifndef DISTRO +DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \ + echo slackware ; \ + elif [ -f /etc/debian_version ] ; then \ + echo debian ;\ + elif which rpm > /dev/null ; then \ + if [ "$(rpm --eval '0%{?suse_version}')" != "0" ] ; then \ + echo suse ;\ + elif [ "$(rpm --eval '%{_host_vendor}')" = redhat ] ; then \ + echo rhel4 ;\ + elif [ "$(rpm --eval '0%{?fedora}')" != "0" ] ; then \ + echo rhel4 ;\ + else \ + echo unknown ;\ + fi ;\ + else \ + echo unknown ;\ + fi) +endif + ifdef DISTRO INSTALLDEPS+=install-$(DISTRO) endif