|
Last change
on this file was 1967, checked in by bird, 17 years ago |
|
scripts/variables/MAKELEVEL: MAKELEVEL is called KMK_LEVEL in kmk so it won't interfer with (kmk_g)make.
|
-
Property svn:eol-style
set to
LF
|
|
File size:
842 bytes
|
| Line | |
|---|
| 1 | # -*-perl-*-
|
|---|
| 2 |
|
|---|
| 3 | $description = "The following test creates a makefile to test
|
|---|
| 4 | makelevels in Make. It prints \$(MAKELEVEL) and then
|
|---|
| 5 | prints the environment variable MAKELEVEL";
|
|---|
| 6 |
|
|---|
| 7 | open(MAKEFILE,"> $makefile");
|
|---|
| 8 |
|
|---|
| 9 | # The Contents of the MAKEFILE ...
|
|---|
| 10 |
|
|---|
| 11 | if (!$is_kmk) {
|
|---|
| 12 | print MAKEFILE <<EOF;
|
|---|
| 13 | all:
|
|---|
| 14 | \t\@echo MAKELEVEL is \$(MAKELEVEL)
|
|---|
| 15 | \techo \$\$MAKELEVEL
|
|---|
| 16 | EOF
|
|---|
| 17 | } else {
|
|---|
| 18 | print MAKEFILE <<EOF;
|
|---|
| 19 | all:
|
|---|
| 20 | \t\@echo KMK_LEVEL is \$(KMK_LEVEL)
|
|---|
| 21 | \techo \$\$KMK_LEVEL
|
|---|
| 22 | EOF
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | # END of Contents of MAKEFILE
|
|---|
| 26 |
|
|---|
| 27 | close(MAKEFILE);
|
|---|
| 28 |
|
|---|
| 29 | # RUN MAKE
|
|---|
| 30 |
|
|---|
| 31 | &run_make_with_options($makefile,"",&get_logfile);
|
|---|
| 32 |
|
|---|
| 33 | # SET ANSWER
|
|---|
| 34 |
|
|---|
| 35 | if (!$is_kmk) {
|
|---|
| 36 | $answer = "MAKELEVEL is 0\necho \$MAKELEVEL\n1\n";
|
|---|
| 37 | } else {
|
|---|
| 38 | $answer = "KMK_LEVEL is 0\necho \$KMK_LEVEL\n1\n";
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | # COMPARE RESULTS
|
|---|
| 42 |
|
|---|
| 43 | &compare_output($answer,&get_logfile(1));
|
|---|
| 44 |
|
|---|
| 45 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.