summaryrefslogtreecommitdiffstats
path: root/src/kmk/testcase-includedep-esc.kmk
blob: 0f08b799a15b8ae451c56c290526c32ade53bfdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# $Id: testcase-includedep-esc.kmk 3318 2020-04-01 07:05:32Z bird $
## @file
# kBuild - testcase for the includedep directive with filename escaping.
#

#
# Copyright (c) 2008-2020 knut st. osmundsen <bird-kBuild-spamxx@anduin.net>
#
# This file is part of kBuild.
#
# kBuild is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# kBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kBuild.  If not, see <http://www.gnu.org/licenses/>
#
#

all_recursive:
	$(ECHO) "includedep works fine"

# Include before header to avoid secondary expansion in the noraml 
# include scenario.
ifndef USE_NORMAL_INCLUDE
includedep testcase-includedep-esc-sub.kmk
else
include testcase-includedep-esc-sub.kmk
endif

# We need the header for variables for special characters.
DEPTH = ../..
include $(PATH_KBUILD)/header.kmk


ifneq ("$(deps-all /phoney/file-with-two-spaces  .c)","/phoney/header-file-with-two-spaces  .h")
$(error /phoney/file-with-two-spaces  .c: $(deps-all /phoney/file-with-two-spaces  .c))
endif

ifneq ("$(deps-all phoney space  1)","/phoney-dep space  1")
$(error phoney space  1: $(deps-all phoney space  1))
endif

ifneq ("$(deps-all phoney colon: 2)","/phoney-dep colon: 2")
$(error phoney colon: 2: $(deps-all phoney colon: 2))
endif

ifneq ("$(deps-all phoney hash$(HASH) 3)","/phoney-dep hash$(HASH) 3")
$(error phoney hash$(HASH) 3: $(deps-all phoney hash$(HASH) 3))
endif

ifeq ("$(deps-all phoney dollar$$ 4)","$/phoney-dep dollar$(DOLLAR) 4")
$(error phoney dollar$$ 4: $(deps-all phoney dollar$$ 4))
endif

ifneq ("$(deps-all phoney slash-space\ 5)","/phoney-dep slash-space\ 5")
$(error phoney slash-space\ 5: $(deps-all phoney slash-space\ 5))
endif

ifneq ("$(deps-all phoney slash-hash\$(HASH) 6)","/phoney-dep slash-hash\$(HASH) 6")
$(error phoney slash-hash\$(HASH) 6: $(deps-all phoney slash-hash\$(HASH) 6))
endif

ifneq ("$(deps-all phoney slash-slash-hash\\$(HASH) 7)","/phoney-dep slash-slash-hash\\$(HASH) 7")
$(error phoney slash-slash-hash\\$(HASH) 7: $(deps-all phoney slash-slash-hash\\$(HASH) 7))
endif

ifneq ("$(deps-all phoney equal= 8)","/phoney-dep equal= 8")
$(error phoney equal= 8: $(deps-all phoney equal= 8))
endif

ifneq ("$(deps-all phoney semI; 9)","/phoney-dep semi; 9")
$(error phoney semI; 9: $(deps-all phoney semI; 9))
endif

ifneq ("$(deps-all phoney percent% 10)","/phoney-dep percent% 10")
$(error phoney percent% 10: $(deps-all phoney percent% 10))
endif

ifneq ("$(deps-all phoney pipe| 11)","/phoney-dep pipe| 11")
$(error phoney pipe| 11: $(deps-all phoney pipe| 11))
endif

ifneq ("$(deps-all phoney plus+ 12)","/phoney-dep plus+ 12")
$(error phoney plus+ 12: $(deps-all phoney plus+ 12))
endif

ifneq ("$(deps-all phoney trailing-slash13\)","/phoney-dep trailing-slash13\")
$(error phoney trailing-slash13\: $(deps-all phoney trailing-slash13\))
endif

ifneq ("$(deps-all phoney trailing-slash13b\)","/phoney-dep trailing-slash13b\")
$(error phoney trailing-slash13b\: $(deps-all phoney trailing-slash13b\))
endif

ifneq ("$(deps-all phoney trailing-slash14\)","/phoney-dep trailing-slash14\ /phoney-dep-ignore")
$(error phoney trailing-slash14\: $(deps-all phoney trailing-slash14\))
endif

ifneq ("$(deps-all phoney 15-trailing-space )","/phoney-dep 15-trailing-space  /phoney-dep-ignore")
$(error phoney 15-trailing-space : $(deps-all phoney 15-trailing-space ))
endif

ifneq ("$(deps-all phoney 16-no-trailing-space\)","/phoney-dep 16-no-trailing-space\")
$(error phoney 16-no-trailing-space\: $(deps-all phoney 16-no-trailing-space\))
endif

ifneq ("$(deps-all phoney 17-3x-escaped-newlines becomes-single-space)","/phoney-dep 17-3x-escaped-newlines becomes-single-space")
$(error phoney 17-3x-escaped-newlines becomes-single-space: $(deps-all phoney 17-3x-escaped-newlines becomes-single-space))
endif

ifneq ("$(deps-all phoney 18-3x-escaped-trailing-spaces-no-newline  \)","/phoney-dep 18-3x-escaped-trailing-spaces-no-newline  \")
$(error phoney 18-3x-escaped-trailing-spaces-no-newline  \: $(deps-all phoney 18-3x-escaped-trailing-spaces-no-newline  \))
endif

ifneq ("$(deps-all phoney 19-target-trailing-space-with-padding )","/phoney-dep 19-target-trailing-space-with-padding  /phoney-dep-ignore")
$(error phoney 19-target-trailing-space-with-padding : $(deps-all phoney 19-target-trailing-space-with-padding ))
endif

ifneq ("$(deps-all phoney 20-target-trailing-space-with-newline-padding )","/phoney-dep 20-target-trailing-space-with-newline-padding  /phoney-dep-ignore")
$(error phoney 20-target-trailing-space-with-newline-padding : $(deps-all phoney 20-target-trailing-space-with-newline-padding ))
endif

ifneq ("$(deps-all phoney 21-target-trailing-space-with-newline-padding-and-tail my-tail-21)","/phoney-dep 21-target-trailing-space-with-newline-padding-and-tail my-tail-21")
$(error 21-target-trailing-space-with-newline-padding-and-tail my-tail-21: $(deps-all 21-target-trailing-space-with-newline-padding-and-tail my-tail-21))
endif