Skip to content

Commit 55f4d73

Browse files
bwhacksShuah Khan
authored andcommitted
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>
1 parent c1ee483 commit 55f4d73

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎tools/testing/selftests/memfd/Makefile‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ CFLAGS += -I../../../../include/uapi/
44
CFLAGS += -I../../../../include/
55
CFLAGS += -I../../../../usr/include/
66

7-
all:
8-
$(CC) $(CFLAGS) memfd_test.c -o memfd_test
9-
107
TEST_PROGS := memfd_test
118

9+
all: $(TEST_PROGS)
10+
1211
include ../lib.mk
1312

14-
build_fuse:
15-
$(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt
16-
$(CC) $(CFLAGS) fuse_test.c -o fuse_test
13+
build_fuse: fuse_mnt fuse_test
14+
15+
fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
16+
fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs)
1717

1818
run_fuse: build_fuse
1919
@./run_fuse_test.sh || echo "fuse_test: [FAIL]"

0 commit comments

Comments
 (0)