From 0d82ca1c5751d90cee21ab7798d923a36e0db6fe Mon Sep 17 00:00:00 2001
From: Mark Huang <mlhuang@cs.princeton.edu>
Date: Wed, 17 Nov 2004 20:55:16 +0000
Subject: [PATCH] - merge revision 1.13 date: 2004/11/17 20:53:23;  author:
 mlhuang;  state: Exp;  lines: +5 -2 - fix basename calculation

---
 Makerules | 7 +++++--
 Rules.mk  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Makerules b/Makerules
index 1bed3cf4..14b4a775 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$
 #
 
 # 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..14b4a775 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$
 #
 
 # 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