diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2015-11-02 07:21:57 -0500 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-11-03 18:54:43 -0500 |
commit | 55f4d731c5b27f3dfe7eaeeb136cd60312f50270 (patch) | |
tree | 932fe7472bfc4f8a8e764a277461d8b5ba06cdc4 | |
parent | c1ee48315d9f0be2c11c61d388a3938c2d4b010a (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>
-rw-r--r-- | tools/testing/selftests/memfd/Makefile | 12 |
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/ | |||
4 | CFLAGS += -I../../../../include/ | 4 | CFLAGS += -I../../../../include/ |
5 | CFLAGS += -I../../../../usr/include/ | 5 | CFLAGS += -I../../../../usr/include/ |
6 | 6 | ||
7 | all: | ||
8 | $(CC) $(CFLAGS) memfd_test.c -o memfd_test | ||
9 | |||
10 | TEST_PROGS := memfd_test | 7 | TEST_PROGS := memfd_test |
11 | 8 | ||
9 | all: $(TEST_PROGS) | ||
10 | |||
12 | include ../lib.mk | 11 | include ../lib.mk |
13 | 12 | ||
14 | build_fuse: | 13 | build_fuse: fuse_mnt fuse_test |
15 | $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt | 14 | |
16 | $(CC) $(CFLAGS) fuse_test.c -o fuse_test | 15 | fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) |
16 | fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs) | ||
17 | 17 | ||
18 | run_fuse: build_fuse | 18 | run_fuse: build_fuse |
19 | @./run_fuse_test.sh || echo "fuse_test: [FAIL]" | 19 | @./run_fuse_test.sh || echo "fuse_test: [FAIL]" |