From 2a3b444ffd91f894b217576dc1ff9ec425fd3b54 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 17 Nov 2004 20:53:23 +0000 Subject: [PATCH] - fix basename calculation --- Makerules | 7 +++++-- Rules.mk | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makerules b/Makerules index 1bed3cf4..1a129131 100644 --- a/Makerules +++ b/Makerules @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.11 2004/09/18 19:50:02 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.12 2004/10/26 21:48:28 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -81,7 +81,10 @@ Source0 := $(notdir $(if $(Source),$(Source),$(Source0))) SOURCES += SOURCES/$(Source0) # Get rid of .tar.bz2 or .tar.gz or .tgz -Base0 := $(basename $(basename $(Source0))) +Base0 := $(Source0:.tgz=) +Base0 := $(Base0:.bz2=) +Base0 := $(Base0:.gz=) +Base0 := $(Base0:.tar=) # Export module SOURCES/$(Base0): diff --git a/Rules.mk b/Rules.mk index 1bed3cf4..1a129131 100644 --- a/Rules.mk +++ b/Rules.mk @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.11 2004/09/18 19:50:02 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.12 2004/10/26 21:48:28 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -81,7 +81,10 @@ Source0 := $(notdir $(if $(Source),$(Source),$(Source0))) SOURCES += SOURCES/$(Source0) # Get rid of .tar.bz2 or .tar.gz or .tgz -Base0 := $(basename $(basename $(Source0))) +Base0 := $(Source0:.tgz=) +Base0 := $(Base0:.bz2=) +Base0 := $(Base0:.gz=) +Base0 := $(Base0:.tar=) # Export module SOURCES/$(Base0): -- 2.47.0