summaryrefslogtreecommitdiffstats
path: root/src/kmk/testcase-includedep-esc.kmk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:21:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:21:29 +0000
commit29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch)
tree63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /src/kmk/testcase-includedep-esc.kmk
parentInitial commit. (diff)
downloadkbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.tar.xz
kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.zip
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/kmk/testcase-includedep-esc.kmk')
-rw-r--r--src/kmk/testcase-includedep-esc.kmk133
1 files changed, 133 insertions, 0 deletions
diff --git a/src/kmk/testcase-includedep-esc.kmk b/src/kmk/testcase-includedep-esc.kmk
new file mode 100644
index 0000000..0f08b79
--- /dev/null
+++ b/src/kmk/testcase-includedep-esc.kmk
@@ -0,0 +1,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
+