VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/functions/substitution@ 1989

最後變更 在這個檔案從1989是 284,由 bird 提交於 20 年 前

Current make snaphot, 2005-05-16.

  • 屬性 svn:eol-style 設為 native
檔案大小: 890 位元組
 
1# -*-perl-*-
2
3$description = "Test the subst and patsubst functions";
4
5$details = "";
6
7# Generic patsubst test: test both the function and variable form.
8
9run_make_test('
10foo := a.o b.o c.o
11bar := $(foo:.o=.c)
12bar2:= $(foo:%.o=%.c)
13bar3:= $(patsubst %.c,%.o,x.c.c bar.c)
14all:;@echo $(bar); echo $(bar2); echo $(bar3)',
15'',
16'a.c b.c c.c
17a.c b.c c.c
18x.c.o bar.o');
19
20# Patsubst without '%'--shouldn't match because the whole word has to match
21# in patsubst. Based on a bug report by Markus Mauhart <[email protected]>
22
23run_make_test('all:;@echo $(patsubst Foo,Repl,FooFoo)', '', 'FooFoo');
24
25# Variable subst where a pattern matches multiple times in a single word.
26# Based on a bug report by Markus Mauhart <[email protected]>
27
28run_make_test('
29A := fooBARfooBARfoo
30all:;@echo $(A:fooBARfoo=REPL)', '', 'fooBARREPL');
31
321;
33
34
35
36
37
38
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette