summaryrefslogtreecommitdiffstats
path: root/test/fixtures/make
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
commit0bc58b66a4850cdb8458a86c3d9a2fc81de82aa3 (patch)
treeea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /test/fixtures/make
parentInitial commit. (diff)
downloadbash-completion-upstream.tar.xz
bash-completion-upstream.zip
Adding upstream version 1:2.11.upstream/1%2.11upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/fixtures/make')
-rw-r--r--test/fixtures/make/.gitignore1
-rw-r--r--test/fixtures/make/Makefile46
-rw-r--r--test/fixtures/make/sample.c8
-rw-r--r--test/fixtures/make/sample.d3
-rw-r--r--test/fixtures/make/sample.h0
5 files changed, 58 insertions, 0 deletions
diff --git a/test/fixtures/make/.gitignore b/test/fixtures/make/.gitignore
new file mode 100644
index 0000000..3d1325c
--- /dev/null
+++ b/test/fixtures/make/.gitignore
@@ -0,0 +1 @@
+extra_makefile
diff --git a/test/fixtures/make/Makefile b/test/fixtures/make/Makefile
new file mode 100644
index 0000000..b04a6eb
--- /dev/null
+++ b/test/fixtures/make/Makefile
@@ -0,0 +1,46 @@
+$(info confuse: make)
+
+CFLAGS=-MMD -MP
+NAME := sample
+
+.PHONY: all
+all: $(NAME)
+
+$(NAME): sample.o
+
+.INTERMEDIATE: sample.o
+sample.o: sample.c
+
+.PHONY: install
+install: all
+ mkdir -p /usr/bin
+ install -m 755 $(NAME) /usr/bin
+
+.PHONY: clean
+clean:
+ -rm -f $(NAME)
+
+.test_passes:
+ ./sample >/dev/null
+ touch ^@
+
+.cache/.1:
+ touch $@
+
+.cache/.2:
+ touch $@
+
+.cache/1:
+ touch $@
+
+.cache/2:
+ touch $@
+
+ifndef __BASH_MAKE_COMPLETION__
+-include sample.d
+endif
+
+VARIABLE_LOOKS_A_BIT_LIKE_A_TARGET := fooled-you
+extra_makefile:
+ touch $@
+include extra_makefile
diff --git a/test/fixtures/make/sample.c b/test/fixtures/make/sample.c
new file mode 100644
index 0000000..4212596
--- /dev/null
+++ b/test/fixtures/make/sample.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "sample.h"
+
+int main(void)
+{
+ puts("Hello, world!");
+ return 0;
+}
diff --git a/test/fixtures/make/sample.d b/test/fixtures/make/sample.d
new file mode 100644
index 0000000..27979ff
--- /dev/null
+++ b/test/fixtures/make/sample.d
@@ -0,0 +1,3 @@
+sample.o: sample.c sample.h
+
+sample.h:
diff --git a/test/fixtures/make/sample.h b/test/fixtures/make/sample.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/fixtures/make/sample.h