default_names

来自「make debug tool. You can use this tool t」· 代码 · 共 50 行

TXT
50
字号
#                                                                    -*-perl-*-# $Id: default_names,v 1.2 2005/12/04 15:48:51 rockyb Exp $$description = "This script tests to make sure that GNU Make looks fordefault makefiles in the correct order: GNUmakefile, makefile, Makefile.On non UNIX platforms, notably Microsoft OS's filenames may be caseinsensitive (e.g. makefile can match Makefile). So on these systems wecheck only the order GNUmakefile, Makefile.Note that this test removes its makefiles on success even if \"--keep\" isin effect.";sub write_makefile($$) {    my ($makefile, $position) = @_;    open(MAKEFILE,">$makefile");    printf MAKEFILE "%s: ; \@echo It chose $makefile\n", $position;    close(MAKEFILE);}sub run_compare_test($) {    my $makefile = $_[0];    &run_make_with_options("","",&get_logfile);    my $answer = "It chose $makefile\n";    &compare_output($answer, &get_logfile(1)) || &error("abort");    unlink $makefile;}# Create a makefile called "GNUmakefile"write_makefile("GNUmakefile", "FIRST");# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.# So we'll have to skip the test of preferring makefile over Makefile.#write_makefile("makefile", "SECOND") if ($port_type eq 'UNIX');# Create another makefile called "Makefile"write_makefile("Makefile", "THIRD");# COMPARE RESULTSrun_compare_test("GNUmakefile");# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.# Just test what we can here (avoid Makefile versus makefile test).#run_compare_test("makefile") if ($port_type eq 'UNIX');run_compare_test("Makefile");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?