mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-25 07:14:36 +08:00
88baa78d1f
Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to indicate the test program, extended test program and test files. It is easy to understand the purpose of these files. But mix of compiled and uncompiled files lead to duplicated "all" and "clean" targets. In order to remove the duplicated targets, introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled objects. Also, the later patch will make use of TEST_GEN_XXX to redirect these files to output directory indicated by KBUILD_OUTPUT or O. And add this changes to "Contributing new tests(details)" of Documentation/kselftest.txt. Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
26 lines
535 B
Makefile
26 lines
535 B
Makefile
CFLAGS = -Wall
|
|
|
|
subdir:
|
|
mkdir -p $@
|
|
script:
|
|
echo '#!/bin/sh' > $@
|
|
echo 'exit $$*' >> $@
|
|
chmod +x $@
|
|
execveat.symlink: execveat
|
|
ln -s -f $< $@
|
|
execveat.denatured: execveat
|
|
cp $< $@
|
|
chmod -x $@
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
TEST_GEN_PROGS := execveat
|
|
TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
|
|
# Makefile is a run-time dependency, since it's accessed by the execveat test
|
|
TEST_FILES := Makefile
|
|
|
|
include ../lib.mk
|
|
|
|
clean:
|
|
rm -rf $(TEST_GEN_PROGS) $(TEST_GEN_FILES) subdir.moved execveat.moved xxxxx*
|