VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/functions/findstring@ 3138

最後變更 在這個檔案從3138是 2596,由 bird 提交於 13 年 前

gnumake/current -> 3.82-cvs.

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.1 KB
 
1$description = "The following test creates a makefile to test the findstring "
2 ."function.";
3
4$details = "";
5
6# IF YOU NEED >1 MAKEFILE FOR THIS TEST, USE &get_tmpfile; TO GET
7# THE NAME OF THE MAKEFILE. THIS INSURES CONSISTENCY AND KEEPS TRACK OF
8# HOW MANY MAKEFILES EXIST FOR EASY DELETION AT THE END.
9# EXAMPLE: $makefile2 = &get_tmpfile;
10
11
12open(MAKEFILE,"> $makefile");
13
14# The Contents of the MAKEFILE ...
15
16print MAKEFILE "string := \$(findstring port, reporter)\n"
17 ."all: \n"
18 ."\t\@echo \$(string) \n";
19
20# END of Contents of MAKEFILE
21
22close(MAKEFILE);
23
24&run_make_with_options($makefile,
25 "",
26 &get_logfile,
27 0);
28
29# Create the answer to what should be produced by this Makefile
30$answer = "port\n";
31
32# COMPARE RESULTS
33
34# In this call to compare output, you should use the call &get_logfile(1)
35# to send the name of the last logfile created. You may also use
36# the special call &get_logfile(1) which returns the same as &get_logfile(1).
37
38&compare_output($answer,&get_logfile(1));
39
40# This tells the test driver that the perl test script executed properly.
411;
42
43
44
45
46
47
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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