From 6f3d4166dd65984a044e282045815ff3675f62ca Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 11 Aug 2004 20:47:48 +0000 Subject: [PATCH] - fix poor man's RPM-to-Makefile conversion regexp so that defined spec variables that are not encased in {} are converted to gmake variables that are also not encased in {} --- Makerules | 6 +++--- Rules.mk | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makerules b/Makerules index 8f4f7e12..33593f4b 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.6 2004/04/12 19:56:02 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.7 2004/04/14 18:05:30 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -48,8 +48,8 @@ MK := SPECS/$(patsubst %.spec,%.mk,$(notdir $(SPEC))) $(MK): SPECS/$(notdir $(SPEC)).in # Substitute '$' for '%' and 'name := value' for '%define name value' or 'name: value' sed -n \ - -e 's/%{/$${/g' \ - -e 's/^%define[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ + -e 's/%\([[:alnum:]]*\)/$${\1}/g' \ + -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \ $< > $@ ifneq ($(INITIAL),$(TAG)) diff --git a/Rules.mk b/Rules.mk index 8f4f7e12..33593f4b 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.6 2004/04/12 19:56:02 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.7 2004/04/14 18:05:30 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -48,8 +48,8 @@ MK := SPECS/$(patsubst %.spec,%.mk,$(notdir $(SPEC))) $(MK): SPECS/$(notdir $(SPEC)).in # Substitute '$' for '%' and 'name := value' for '%define name value' or 'name: value' sed -n \ - -e 's/%{/$${/g' \ - -e 's/^%define[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ + -e 's/%\([[:alnum:]]*\)/$${\1}/g' \ + -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \ $< > $@ ifneq ($(INITIAL),$(TAG)) -- 2.47.0