From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PlZw7-0007Cx-W8 for garchives@archives.gentoo.org; Sat, 05 Feb 2011 04:39:52 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B83D4E0852; Sat, 5 Feb 2011 04:39:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 78D21E0852 for ; Sat, 5 Feb 2011 04:39:41 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E675A1B413A for ; Sat, 5 Feb 2011 04:39:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4C39B8006A for ; Sat, 5 Feb 2011 04:39:40 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <19037cbd83ee46f2c3510925c83cc89d27d16ac6.williamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: src/librc/, init.d/, / X-VCS-Repository: proj/openrc X-VCS-Files: Makefile init.d/Makefile src/librc/Makefile X-VCS-Directories: src/librc/ init.d/ / X-VCS-Committer: williamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 19037cbd83ee46f2c3510925c83cc89d27d16ac6 Date: Sat, 5 Feb 2011 04:39:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: c72e38b8c802852831a03027d229562d commit: 19037cbd83ee46f2c3510925c83cc89d27d16ac6 Author: William Hubbs gentoo org> AuthorDate: Wed Feb 2 18:10:58 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Feb 4 23:46:57 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D19037cbd remove unnecessary shell calls The main makefile, init.d/Makefile and src/librc/Makefile all contain several shell calls which can be handled as make conditionals. This switches them to conditionals. --- Makefile | 19 +++++++------------ init.d/Makefile | 8 +++----- src/librc/Makefile | 29 +++++++++++++++++------------ 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index d2e1593..dd427d0 100644 --- a/Makefile +++ b/Makefile @@ -7,20 +7,15 @@ include Makefile.inc SUBDIR=3D conf.d etc init.d local.d man scripts sh src =20 # Build our old net foo or not -_OLDNET_SH=3D case "${MKOLDNET}" in \ - [Yy][Ee][Ss]) echo "net doc";; \ - *) echo "";; \ - esac -_OLDNET:=3D $(shell ${_OLDNET_SH}) -SUBDIR+=3D ${_OLDNET} +ifeq (${MKOLDNET},yes) +SUBDIR+=3D net doc +endif =20 # Build pkgconfig or not -_PKGCONFIG_SH=3D case "${MKPKGCONFIG}" in \ - [Yy][Ee][Ss]|"") echo "pkgconfig";; \ - *) echo "";; \ - esac -_PKGCONFIG:=3D $(shell ${_PKGCONFIG_SH}) -SUBDIR+=3D ${_PKGCONFIG} +MKPKGCONFIG?=3D yes +ifeq (${MKPKGCONFIG},yes) +SUBDIR+=3D pkgconfig +endif =20 # We need to ensure that runlevels is done last SUBDIR+=3D runlevels diff --git a/init.d/Makefile b/init.d/Makefile index 29ebe59..b7490d3 100644 --- a/init.d/Makefile +++ b/init.d/Makefile @@ -5,11 +5,9 @@ SRCS=3D bootmisc.in fsck.in hostname.in local.in localmo= unt.in netmount.in \ BIN=3D ${OBJS} =20 # Build our old net foo or not -_OLDNET_SH=3D case "${MKOLDNET}" in \ - [Yy][Ee][Ss]) echo "net.lo";; \ - *) echo "";; \ - esac -_OLDNET:=3D $(shell ${_OLDNET_SH}) +ifeq (${MKOLDNET},yes) +_OLDNET=3D net.lo +endif _NET_LO=3D ${_OLDNET} =20 INSTALLAFTER=3D _installafter_${_NET_LO} diff --git a/src/librc/Makefile b/src/librc/Makefile index eb6f6fd..574aa2a 100644 --- a/src/librc/Makefile +++ b/src/librc/Makefile @@ -19,20 +19,25 @@ SED_CMD=3D -e 's:@PREFIX@:${PREFIX}:g' SED_CMD+=3D -e 's:@LIB@:${LIBNAME}:g' SED_CMD+=3D -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' SED_CMD+=3D -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -_PKG_PREFIX_SH=3D if test -n "${PKG_PREFIX}" && test "${PKG_PREFIX}" !=3D= "/" && test "${PKG_PREFIX}" !=3D "${PREFIX}"; then \ - echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; \ - else \ - echo "-e 's:.*@PKG_PREFIX@.*:\#undef RC_PKG_PREFIX:g'"; \ - fi -_PKG_PREFIX:=3D $(shell ${_PKG_PREFIX_SH}) + +_PKG_PREFIX=3D -e 's:.*@PKG_PREFIX@.*:\#undef RC_PKG_PREFIX:g' +ifneq (${PKG_PREFIX},) +ifneq (${PKG_PREFIX},/) +ifneq (${PKG_PREFIX},${PREFIX}) +_PKG_PREFIX=3D -e 's:@PKG_PREFIX@:${PKG_PREFIX}:g' +endif +endif +endif SED_CMD+=3D ${_PKG_PREFIX} =20 -_LCL_PREFIX_SH=3D if test -n "${LOCAL_PREFIX}" && test "${LOCAL_PREFIX}"= !=3D "/" && test "${LOCAL_PREFIX}" !=3D "${PREFIX}"; then \ - echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; \ - else \ - echo "-e 's:@LOCAL_PREFIX@::g'"; \ - fi -_LCL_PREFIX:=3D $(shell ${_LCL_PREFIX_SH}) +_LCL_PREFIX=3D -e 's:@LOCAL_PREFIX@::g' +ifneq (${LOCAL_PREFIX},) +ifneq (${LOCAL_PREFIX},/) +ifneq (${LOCAL_PREFIX},${PREFIX}) +_LCL_PREFIX=3D -e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g' +endif +endif +endif SED_CMD+=3D ${_LCL_PREFIX} =20 .SUFFIXES: .h.in .h