2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 18:17:09 +00:00

Add a tst_binaries target to the parser to build tst binaries

This allows building the tst_* binaries in parallel independently of running the parser test suite

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
(cherry picked from commit 2e841655cfa872d50b1e67f7d67f2fda5a725969)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Ryan Lee 2024-10-17 14:20:42 -07:00 committed by John Johansen
parent 1555b8371b
commit 3e8f851691

View File

@ -365,6 +365,9 @@ cap_names.h: generated_cap_names.h base_cap_names.h
exit 1; \ exit 1; \
fi fi
.PHONY: tst_binaries
tst_binaries: $(TESTS)
tst_lib: lib.c parser.h $(filter-out lib.o, ${TEST_OBJECTS}) tst_lib: lib.c parser.h $(filter-out lib.o, ${TEST_OBJECTS})
$(CXX) $(TEST_CFLAGS) -o $@ $< $(filter-out $(<:.c=.o), ${TEST_OBJECTS}) $(TEST_LDFLAGS) $(TEST_LDLIBS) $(CXX) $(TEST_CFLAGS) -o $@ $< $(filter-out $(<:.c=.o), ${TEST_OBJECTS}) $(TEST_LDFLAGS) $(TEST_LDLIBS)
tst_%: parser_%.c parser.h $(filter-out parser_%.o, ${TEST_OBJECTS}) tst_%: parser_%.c parser.h $(filter-out parser_%.o, ${TEST_OBJECTS})