summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/memfd
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2015-11-02 12:21:57 +0000
committerShuah Khan <shuahkh@osg.samsung.com>2015-11-03 16:54:43 -0700
commit55f4d731c5b27f3dfe7eaeeb136cd60312f50270 (patch)
tree932fe7472bfc4f8a8e764a277461d8b5ba06cdc4 /tools/testing/selftests/memfd
parentc1ee48315d9f0be2c11c61d388a3938c2d4b010a (diff)
selftests: memfd: Stop unnecessary rebuilds
Instead of explicitly running the compiler, add dependencies and take advantage of implicit rules to build only as necessary. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/memfd')
-rw-r--r--tools/testing/selftests/memfd/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index 3e7eb7972511..fd396ac811b6 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -4,16 +4,16 @@ CFLAGS += -I../../../../include/uapi/
CFLAGS += -I../../../../include/
CFLAGS += -I../../../../usr/include/
-all:
- $(CC) $(CFLAGS) memfd_test.c -o memfd_test
-
TEST_PROGS := memfd_test
+all: $(TEST_PROGS)
+
include ../lib.mk
-build_fuse:
- $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt
- $(CC) $(CFLAGS) fuse_test.c -o fuse_test
+build_fuse: fuse_mnt fuse_test
+
+fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
+fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs)
run_fuse: build_fuse
@./run_fuse_test.sh || echo "fuse_test: [FAIL]"