xref: /netbsd-src/external/gpl2/gmake/dist/tests/scripts/targets/FORCE (revision 69606e3f5c9388e52aed8c120ad63c049ca45d8f)
1*69606e3fSchristos#                                                                    -*-perl-*-
2*69606e3fSchristos
3*69606e3fSchristos$description = "The following tests rules without Commands or Dependencies.";
4*69606e3fSchristos
5*69606e3fSchristos$details = "If the rule ...\n";
6*69606e3fSchristos
7*69606e3fSchristosopen(MAKEFILE,"> $makefile");
8*69606e3fSchristos
9*69606e3fSchristos# The Contents of the MAKEFILE ...
10*69606e3fSchristos
11*69606e3fSchristosprint MAKEFILE ".IGNORE :\n";
12*69606e3fSchristosprint MAKEFILE "clean: FORCE\n";
13*69606e3fSchristosprint MAKEFILE "\t$delete_command clean\n";
14*69606e3fSchristosprint MAKEFILE "FORCE:\n";
15*69606e3fSchristos
16*69606e3fSchristos# END of Contents of MAKEFILE
17*69606e3fSchristos
18*69606e3fSchristosclose(MAKEFILE);
19*69606e3fSchristos
20*69606e3fSchristos
21*69606e3fSchristos# Create a file named "clean".  This is the same name as the target clean
22*69606e3fSchristos# and tricks the target into thinking that it is up to date.  (Unless you
23*69606e3fSchristos# use the .PHONY target.
24*69606e3fSchristos&touch("clean");
25*69606e3fSchristos
26*69606e3fSchristos$answer = "$delete_command clean\n";
27*69606e3fSchristos&run_make_with_options($makefile,"clean",&get_logfile);
28*69606e3fSchristos
29*69606e3fSchristos&compare_output($answer,&get_logfile(1));
30*69606e3fSchristos
31*69606e3fSchristos1;
32*69606e3fSchristos
33*69606e3fSchristos
34*69606e3fSchristos
35*69606e3fSchristos
36*69606e3fSchristos
37*69606e3fSchristos
38*69606e3fSchristos
39*69606e3fSchristos
40*69606e3fSchristos
41