From: Mark Huang Date: Wed, 11 Aug 2004 21:41:16 +0000 (+0000) Subject: - fix regexps (%{name} was getting replaced by ${}name}) X-Git-Tag: planetlab-2_0-branch-point~12 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d763081a59d3fa36af724f9bbe852f3175118ab2;p=build.git - fix regexps (%{name} was getting replaced by ${}name}) --- diff --git a/Makerules b/Makerules index 33593f4b..231e1638 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.7 2004/04/14 18:05:30 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.8 2004/08/11 20:47:48 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -48,7 +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/%\([[:alnum:]]*\)/$${\1}/g' \ + -e 's/%{/$${/g' \ + -e 's/%\([[:alnum:]]\+\)/$${\1}/g' \ -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \ $< > $@ diff --git a/Rules.mk b/Rules.mk index 33593f4b..231e1638 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.7 2004/04/14 18:05:30 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.8 2004/08/11 20:47:48 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -48,7 +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/%\([[:alnum:]]*\)/$${\1}/g' \ + -e 's/%{/$${/g' \ + -e 's/%\([[:alnum:]]\+\)/$${\1}/g' \ -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \ -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \ $< > $@