build/pymake/tests/var-substitutions.mk

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 SIMPLEVAR = aabb.cc
michael@0 2 SIMPLEPERCENT = test_value%extra
michael@0 3
michael@0 4 SIMPLE3SUBSTNAME = SIMPLEVAR:.dd
michael@0 5 $(SIMPLE3SUBSTNAME) = weirdval
michael@0 6
michael@0 7 PERCENT = dummy
michael@0 8
michael@0 9 SIMPLESUBST = $(SIMPLEVAR:.cc=.dd)
michael@0 10 SIMPLE2SUBST = $(SIMPLEVAR:.cc)
michael@0 11 SIMPLE3SUBST = $(SIMPLEVAR:.dd)
michael@0 12 SIMPLE4SUBST = $(SIMPLEVAR:.cc=.dd=.ee)
michael@0 13 SIMPLE5SUBST = $(SIMPLEVAR:.cc=%.dd)
michael@0 14 PERCENTSUBST = $(SIMPLEVAR:%.cc=%.ee)
michael@0 15 PERCENT2SUBST = $(SIMPLEVAR:aa%.cc=ff%.f)
michael@0 16 PERCENT3SUBST = $(SIMPLEVAR:aa%.dd=gg%.gg)
michael@0 17 PERCENT4SUBST = $(SIMPLEVAR:aa%.cc=gg)
michael@0 18 PERCENT5SUBST = $(SIMPLEVAR:aa)
michael@0 19 PERCENT6SUBST = $(SIMPLEVAR:%.cc=%.dd=%.ee)
michael@0 20 PERCENT7SUBST = $(SIMPLEVAR:$(PERCENT).cc=%.dd)
michael@0 21 PERCENT8SUBST = $(SIMPLEVAR:%.cc=$(PERCENT).dd)
michael@0 22 PERCENT9SUBST = $(SIMPLEVAR:$(PERCENT).cc=$(PERCENT).dd)
michael@0 23 PERCENT10SUBST = $(SIMPLEVAR:%%.bb.cc=zz.bb.cc)
michael@0 24 PERCENT11SUBST = $(SIMPLEPERCENT:test%value%extra=other%value%extra)
michael@0 25
michael@0 26 SPACEDVAR = $(NULL) ex1.c ex2.c $(NULL)
michael@0 27 SPACEDSUBST = $(SPACEDVAR:.c=.o)
michael@0 28
michael@0 29 all:
michael@0 30 test "$(SIMPLESUBST)" = "aabb.dd"
michael@0 31 test "$(SIMPLE2SUBST)" = ""
michael@0 32 test "$(SIMPLE3SUBST)" = "weirdval"
michael@0 33 test "$(SIMPLE4SUBST)" = "aabb.dd=.ee"
michael@0 34 test "$(SIMPLE5SUBST)" = "aabb%.dd"
michael@0 35 test "$(PERCENTSUBST)" = "aabb.ee"
michael@0 36 test "$(PERCENT2SUBST)" = "ffbb.f"
michael@0 37 test "$(PERCENT3SUBST)" = "aabb.cc"
michael@0 38 test "$(PERCENT4SUBST)" = "gg"
michael@0 39 test "$(PERCENT5SUBST)" = ""
michael@0 40 test "$(PERCENT6SUBST)" = "aabb.dd=%.ee"
michael@0 41 test "$(PERCENT7SUBST)" = "aabb.dd"
michael@0 42 test "$(PERCENT8SUBST)" = "aabb.dd"
michael@0 43 test "$(PERCENT9SUBST)" = "aabb.dd"
michael@0 44 test "$(PERCENT10SUBST)" = "aabb.cc"
michael@0 45 test "$(PERCENT11SUBST)" = "other_value%extra"
michael@0 46 test "$(SPACEDSUBST)" = "ex1.o ex2.o"
michael@0 47 @echo TEST-PASS
michael@0 48
michael@0 49 PERCENT = %

mercurial