VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/variables/MAKEFLAGS@ 3532

Last change on this file since 3532 was 3140, checked in by bird, 7 years ago

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

File size: 1.2 KB
Line 
1# -*-perl-*-
2
3$description = "Test proper behavior of MAKEFLAGS";
4
5$details = "DETAILS";
6
7# Normal flags aren't prefixed with "-"
8run_make_test(q!
9all: ; @echo $(MAKEFLAGS)
10!,
11 '-e -r -R', 'erR');
12
13# Long arguments mean everything is prefixed with "-"
14run_make_test(q!
15all: ; @echo $(MAKEFLAGS)
16!,
17 '--no-print-directory -e -r -R --trace', "#MAKEFILE#:2: target 'all' does not exist
18echo erR --trace --no-print-directory
19erR --trace --no-print-directory");
20
21
22# Recursive invocations of make should accumulate MAKEFLAGS values.
23# Savannah bug #2216
24run_make_test(q!
25MSG = Fails
26all:
27 @echo '$@: MAKEFLAGS=$(MAKEFLAGS)'
28 @MSG=Works $(MAKE) -e -f #MAKEFILE# jump
29jump:
30 @echo '$@ $(MSG): MAKEFLAGS=$(MAKEFLAGS)'
31 @$(MAKE) -f #MAKEFILE# print
32print:
33 @echo '$@ $(MSG): MAKEFLAGS=$(MAKEFLAGS)'
34.PHONY: all jump print
35!,
36 '--no-print-directory',
37 'all: MAKEFLAGS= --no-print-directory
38jump Works: MAKEFLAGS=e --no-print-directory
39print Works: MAKEFLAGS=e --no-print-directory');
40
411;
42
43### Local Variables:
44### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
45### End:
Note: See TracBrowser for help on using the repository browser.

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